Skip to content

Commit

Permalink
🔖 Releasing 2.0.0.alpha.
Browse files Browse the repository at this point in the history
  • Loading branch information
BrikerMan committed Jun 10, 2020
1 parent 849762e commit 7b0647a
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/about/contributing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Contributing & Support
# Contributing & Support

We are happy to accept contributions that make `Kashgari` better and more awesome! You could contribute in various ways:

Expand Down
13 changes: 13 additions & 0 deletions docs/about/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,19 @@ pip show kashgari

## Current Release

### [2.0.0.alpha] - 2020.06.10

This is a fully re-implemented version with TF2.

- ✨ Embeddings
- ✨ Text Classification Task
- ✨ Text Labeling Task
- ✨ Seq2Seq Task
- ✨ Examples
- ✨ Neural machine translation with Seq2Seq
- ✨ Benchmarks


### [1.1.1] - 2020.03.13

- ✨ Add BERTEmbeddingV2.
Expand Down
6 changes: 3 additions & 3 deletions docs/apis/generators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ CorpusGenerator
.. autoclass:: kashgari.generators.CorpusGenerator
:members:

BatchDataGenerator
==================
.. autoclass:: kashgari.generators.BatchDataGenerator
BatchDataSet
============
.. autoclass:: kashgari.generators.BatchDataSet
:members:
15 changes: 14 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def __getattr__(cls, name):
'sphinx.ext.intersphinx',
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx_autodoc_typehints'
'sphinx_autodoc_typehints',
'nbsphinx',
'sphinx.ext.mathjax',
]

# sphinx_autodoc_typehints settings
Expand Down Expand Up @@ -325,12 +327,23 @@ def setup(app):

from m2r import convert
import typing
import shutil

typing.TYPE_CHECKING = True

docs_path = pathlib.Path(__file__).parent
original_readme = os.path.join(docs_path.parent, 'README.md')
rst_readme = os.path.join(docs_path, 'README.rst')

# Copy Examples to docs folder for rendering
original_examples_folder = os.path.join(docs_path.parent, 'examples')
target_examples_folder = os.path.join(docs_path, 'examples')
shutil.rmtree(target_examples_folder, ignore_errors=True)

shutil.copytree(original_examples_folder,
target_examples_folder,
symlinks=True)

# Change readme to rst file, and include in Sphinx index
with open(rst_readme, 'w') as f:
md_content = open(original_readme, 'r').read()
Expand Down
18 changes: 12 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
:maxdepth: 2
:caption: Embeddings

embeddings/index.rst
embeddings/bare-embedding.rst
embeddings/word-embedding.rst
embeddings/bert-embedding.rst
embeddings/index
embeddings/bare-embedding
embeddings/word-embedding
embeddings/bert-embedding

.. toctree::
:maxdepth: 3
Expand All @@ -33,9 +33,15 @@
apis/processors.rst
apis/generators.rst

.. toctree::
:maxdepth: 3
:caption: Examples

examples/translate_with_seq2seq.ipynb

.. toctree::
:maxdepth: 2
:caption: About

about/contributing.rst
about/release-notes.rst
about/contributing
about/release-notes
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ sphinx-markdown-tables
sphinx-autodoc-typehints
recommonmark
m2r
nbsphinx

# dependence
numpy==1.18.1
Expand Down
11 changes: 6 additions & 5 deletions examples/translate_with_seq2seq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"id": "lY2BrIyFKbAP"
},
"source": [
"# Install dependences"
"# Neural machine translation with Seq2Seq\n",
"## Install dependences"
]
},
{
Expand Down Expand Up @@ -433,8 +434,8 @@
"\n",
"%matplotlib inline\n",
"\n",
"font_name = 'SIMHEI' \n",
"plt.rcParams['font.family'] = font_name #用来正常显示中文标签 \n",
"font_name = 'SIMHEI'\n",
"plt.rcParams['font.family'] = font_name #用来正常显示中文标签\n",
"plt.rcParams['axes.unicode_minus']=False #用来正常显示负号\n",
"zhfont = font_manager.FontProperties(fname='/usr/share/fonts/truetype/SimHei.ttf')\n",
"\n",
Expand Down Expand Up @@ -480,7 +481,7 @@
"plt.figure(figsize=(5,5))\n",
"plt.plot(history.history['loss'])\n",
"plt.xlabel('Epoch')\n",
"plt.ylabel('Loss') \n",
"plt.ylabel('Loss')\n",
"plt.show()"
]
},
Expand Down Expand Up @@ -776,4 +777,4 @@
},
"nbformat": 4,
"nbformat_minor": 4
}
}
1 change: 1 addition & 0 deletions requirements.dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sphinx-markdown-tables
sphinx-autodoc-typehints
recommonmark
m2r
nbsphinx

# develop
jupyterlab

0 comments on commit 7b0647a

Please sign in to comment.