Skip to content

Commit 28657e3

Browse files
committed
Update docs
1 parent 4cdeff1 commit 28657e3

32 files changed

+603
-246
lines changed

docs/requirements.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
sphinx>=3.0
1+
sphinx
2+
sphinx-astrorefs
3+
sphinx-book-theme
4+
sphinxcontrib-bibtex

docs/source/conf.py

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- Project information -----------------------------------------------------
2020

2121
project = 'SuPar'
22-
copyright = '2020, Yu Zhang'
22+
copyright = '2018-2021, Yu Zhang'
2323
author = 'Yu Zhang'
2424

2525
# The short X.Y version
@@ -39,16 +39,18 @@
3939
'sphinx.ext.mathjax',
4040
'sphinx.ext.napoleon',
4141
'sphinx.ext.todo',
42-
'sphinx.ext.viewcode']
42+
'sphinx.ext.viewcode',
43+
'sphinxcontrib.bibtex',
44+
'sphinx_astrorefs']
4345

4446
# Add any paths that contain templates here, relative to this directory.
4547
templates_path = ['_templates']
4648

4749
# The suffix(es) of source filenames.
48-
# You can specify multiple suffix as a list of string:
50+
# # You can specify multiple suffix as a list of string:
4951
#
5052
# source_suffix = ['.rst', '.md']
51-
source_suffix = '.rst'
53+
source_suffix = ['.rst', '.md']
5254

5355
# The master toctree document.
5456
master_doc = 'index'
@@ -73,7 +75,16 @@
7375
# The theme to use for HTML and HTML Help pages. See the documentation for
7476
# a list of builtin themes.
7577
#
76-
html_theme = 'sphinx_rtd_theme'
78+
html_theme = 'sphinx_book_theme'
79+
html_theme_options = {
80+
"theme_dev_mode": True,
81+
"path_to_docs": "docs",
82+
"repository_url": "https://github.com/yzhangcs/parser",
83+
"use_edit_page_button": True,
84+
"use_issues_button": True,
85+
"use_repository_button": True,
86+
"use_download_button": True
87+
}
7788

7889
# Add any paths that contain custom static files (such as style sheets) here,
7990
# relative to this directory. They are copied after the builtin static files,
@@ -89,3 +100,6 @@
89100
}
90101

91102
autodoc_member_order = 'bysource'
103+
104+
# bibtex
105+
bibtex_bibfiles = ['refs.bib']

docs/source/index.rst

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,42 @@
44
contain the root `toctree` directive.
55
66
SuPar
7-
=================================
8-
The :mod:`SuPar` package provides a collection of state-of-the-art syntactic parsing models with Biaffine Parser as the basic architecture.
7+
===============================================================================
8+
9+
.. image:: https://github.com/yzhangcs/parser/workflows/build/badge.svg
10+
:alt: build
11+
:target: https://github.com/yzhangcs/parser/actions
12+
.. image:: https://readthedocs.org/projects/parser/badge/?version=latest
13+
:alt: docs
14+
:target: https://parser.readthedocs.io/en/latest
15+
.. image:: https://img.shields.io/pypi/v/supar
16+
:alt: release
17+
:target: https://github.com/yzhangcs/parser/releases
18+
.. image:: https://img.shields.io/github/downloads/yzhangcs/parser/total
19+
:alt: downloads
20+
:target: https://pypistats.org/packages/supar
21+
.. image:: https://img.shields.io/github/license/yzhangcs/parser
22+
:alt: LICENSE
23+
:target: https://github.com/yzhangcs/parser/blob/master/LICENSE
24+
25+
A Python package that includes many state-of-the-art syntactic/semantic parsers (with pretrained models for more than 19 languages), as well as highly-parallelized implementations of several well-known and effective structured prediction algorithms.
926

1027
.. toctree::
1128
:maxdepth: 2
12-
:caption: Contents
29+
:caption: Content
1330

1431
self
15-
parsers
16-
models
17-
modules
18-
utils
32+
parsers/index
33+
models/index
34+
structs/index
35+
modules/index
36+
utils/index
37+
refs
1938

2039
Indices and tables
21-
==================
40+
================================================================
2241

2342
* :ref:`genindex`
2443
* :ref:`modindex`
2544
* :ref:`search`
45+

docs/source/models.rst

Lines changed: 0 additions & 47 deletions
This file was deleted.

docs/source/models/con.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Constituency Models
2+
==================================================================
3+
4+
.. currentmodule:: supar.models.con
5+
6+
CRFConstituencyModel
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: CRFConstituencyModel
9+
:members:
10+
11+
VIConstituencyModel
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: VIConstituencyModel
14+
:members:

docs/source/models/dep.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Dependency Models
2+
================================================================
3+
4+
.. currentmodule:: supar.models.dep
5+
6+
BiaffineDependencyModel
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: BiaffineDependencyModel
9+
:members:
10+
11+
CRFDependencyModel
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: CRFDependencyModel
14+
:members:
15+
16+
CRF2oDependencyModel
17+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
.. autoclass:: CRF2oDependencyModel
19+
:members:
20+
21+
VIDependencyModel
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
.. autoclass:: VIDependencyModel
24+
:members:

docs/source/models/index.rst

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Models
2+
================================================================
3+
4+
.. currentmodule:: supar.models
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
dep
10+
con
11+
sdp

docs/source/models/sdp.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Semantic Dependency Models
2+
=========================================================================
3+
4+
.. currentmodule:: supar.models.sdp
5+
6+
BiaffineSemanticDependencyModel
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: BiaffineSemanticDependencyModel
9+
:members:
10+
11+
VISemanticDependencyModel
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: VISemanticDependencyModel
14+
:members:

docs/source/modules.rst

Lines changed: 0 additions & 73 deletions
This file was deleted.

docs/source/modules/affine.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Affine Layers
2+
================================================================
3+
4+
.. currentmodule:: supar.modules.affine
5+
6+
Biaffine
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: Biaffine
9+
:members:
10+
11+
Triaffine
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: Triaffine
14+
:members:

docs/source/modules/dropout.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Dropout Layers
2+
================================================================
3+
4+
.. currentmodule:: supar.modules.dropout
5+
6+
IndependentDropout
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: IndependentDropout
9+
:members:
10+
11+
SharedDropout
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: SharedDropout
14+
:members:

docs/source/modules/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Modules
2+
================================================================
3+
4+
.. currentmodule:: supar.modules
5+
6+
.. toctree::
7+
:maxdepth: 2
8+
9+
affine
10+
transformer
11+
lstm
12+
dropout
13+
mlp

docs/source/modules/lstm.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
LSTM Layers
2+
================================================================
3+
4+
.. currentmodule:: supar.modules.lstm
5+
6+
CharLSTM
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: CharLSTM
9+
:members:
10+
11+
VariationalLSTM
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: VariationalLSTM
14+
:members:

docs/source/modules/mlp.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Linear Layers
2+
================================================================
3+
4+
.. currentmodule:: supar.modules.mlp
5+
6+
MLP
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: MLP
9+
:members:

docs/source/modules/transformer.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Transformer Layers
2+
================================================================
3+
4+
.. currentmodule:: supar.modules.transformer
5+
6+
TransformerEmbedding
7+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8+
.. autoclass:: TransformerEmbedding
9+
:members:
10+
11+
ScalarMix
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
.. autoclass:: ScalarMix
14+
:members:

0 commit comments

Comments
 (0)