Skip to content

Commit

Permalink
Fix documentation for *2vec models (#2087)
Browse files Browse the repository at this point in the history
* Remove useless methods

* started working on docstrings

* more work done

* Finished documentation for the `BaseWordEmbeddingsModel

* PEP-8

* Revert "Remove useless methods"

This reverts commit feb3c32.

* added documentation for the  class and all its helper methods

* remove duplicated type info

* Added documentation for `Doc2vec` model and all its helper methods

* Fixed paper references and added documentation for �Doc2VecVocab

* Fixed paper references

* minor referencing fixes

* sphinx identation

* Added docstrings for the private methods in `BaseAny2Vec`

* Applied all code review corrections, example fix still pending

* Added missing docstrings

* Fixed `int {1, 0}` -> `{1, 0}`

* Fixed examples and code review corrections

* Fixed examples and applied code review corrections (optional arguments, correct types, blank lines at end of docstrings

* Applied code review corrections and added top level usage examples

* Added high level explanation of the class hierarchy, fixed code review corrections

* Final identation fixes

* Documentation fixes

* Fixed all examples

* delete redundant reference to module

* Added explanation for all important class attributes. These include some intuitive information taken from the papers but also references to usage examples for users that do not wish to understand the underlying theory.

* documented public cython functions

* documented public cython functions in doc2vec

* Applied code review corrections

* added documentation for public cython methods in `fasttext`

* added documentation for C functions in the word2vec

* fix build issues

* add missing rst

* fix base_any2vec

* fix doc2vec[1]

* fix doc2vec[2]

* fix doc2vec[3ъ

* fix doc2vec[4]

* fix doc2vec_inner + remove unused imports

* fix fasttext[1]

* reformat example sections

* word2vec doc fixes

* more doc fixes

* merging in changes from #1944

* review docs for doc2vec, base_any2vec

* review fasttext docs

* review poincare docs

* minor typo fixes

* simplify word2vec.train() docs

* update alpha & epoch docs for *2vec models

* add *_inner docs

* fixing KeyedVectors docs

* disable sphinx latex and errors (temporary, revert later)

* hyperlink fixes

* Fix build warnings

* fix flake8

* enable strict doc building

* embedsignature for w2v & ft

* yes/no -> ✅/❌

* cleanup base_any2vec

* clenup cython files

* cleanup doc2vec

* improve d2v example

* cleanup fasttext

* clenup utils_any2vec

* clenup poincare

* clenup keyedvectors

* cleanup word2vec

* add newline around module docstrings + re-generate *.c files (for correct doc building)
  • Loading branch information
piskvorky authored and menshikh-iv committed Jun 20, 2018
1 parent 8715c00 commit 90c22fd
Show file tree
Hide file tree
Showing 20 changed files with 10,144 additions and 7,207 deletions.
2 changes: 1 addition & 1 deletion docs/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ html:
@echo
@echo "Build finished. The HTML pages are in ../"

upload:
upload:
scp -r _build/html/* rr:public_html/gensim/

dirhtml:
Expand Down
4 changes: 4 additions & 0 deletions docs/src/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ Modules:
models/callbacks
models/utils_any2vec
models/_utils_any2vec
models/word2vec_inner
models/doc2vec_inner
models/fasttext_inner
models/wrappers/ldamallet
models/wrappers/dtmmodel
models/wrappers/ldavowpalwabbit.rst
Expand All @@ -64,6 +67,7 @@ Modules:
models/deprecated/word2vec
models/deprecated/keyedvectors
models/deprecated/fasttext_wrapper
models/base_any2vec
similarities/docsim
similarities/index
sklearn_api/atmodel
Expand Down
10 changes: 10 additions & 0 deletions docs/src/models/base_any2vec.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
:mod:`models.base_any2vec` -- Base classes for any2vec models
=============================================================

.. automodule:: gensim.models.base_any2vec
:synopsis: Base classes for any2vec models
:members:
:inherited-members:
:special-members: __getitem__
:undoc-members:
:show-inheritance:
9 changes: 9 additions & 0 deletions docs/src/models/doc2vec_inner.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:mod:`models.doc2vec_inner` -- Cython routines for training Doc2Vec models
==========================================================================

.. automodule:: gensim.models.doc2vec_inner
:synopsis: Optimized Cython routines for training Doc2Vec models
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
9 changes: 9 additions & 0 deletions docs/src/models/fasttext_inner.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:mod:`models.fasttext_inner` -- Cython routines for training FastText models
============================================================================

.. automodule:: gensim.models.fasttext_inner
:synopsis: Optimized Cython routines for training FastText models
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
9 changes: 9 additions & 0 deletions docs/src/models/word2vec_inner.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
:mod:`models.word2vec_inner` -- Cython routines for training Word2Vec models
============================================================================

.. automodule:: gensim.models.word2vec_inner
:synopsis: Optimized Cython routines for training Word2Vec models
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
Loading

0 comments on commit 90c22fd

Please sign in to comment.