-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix documentation for gensim.models.wrappers
#1859
Fix documentation for gensim.models.wrappers
#1859
Conversation
gensim.models.wrappers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start @kakshay21, please continue 👍
gensim/models/wrappers/dtmmodel.py
Outdated
@@ -6,16 +6,17 @@ | |||
# Based on Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz> | |||
|
|||
|
|||
""" | |||
Python wrapper for Dynamic Topic Models (DTM) and the Document Influence Model (DIM) [1]. | |||
"""Python wrapper for Dynamic Topic Models (DTM) and the Document Influence Model (DIM) [1]. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be really great if you add short instruction "How to install 'backend' for it" for each wrapper.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!, I forgot about it.
gensim/models/wrappers/dtmmodel.py
Outdated
---------- | ||
dtm_path : str | ||
path to the dtm executable, e.g. `C:/dtm/dtm-win64.exe`. | ||
corpus : sparse vector |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typical corpus type is iterable of iterable of (int, int)
gensim/models/wrappers/dtmmodel.py
Outdated
Parameters | ||
---------- | ||
dtm_path : str | ||
path to the dtm executable, e.g. `C:/dtm/dtm-win64.exe`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All descriptions must begin with a capital letter.
gensim/models/wrappers/dtmmodel.py
Outdated
Example: | ||
|
||
Examples | ||
-------- | ||
>>> model = gensim.models.wrappers.DtmModel('dtm-win64.exe', my_corpus, my_timeslices, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add imports to examples (this impossible to make it really executable, but this can be very near to executable variant (i.e. all needed imports, define all variables, etc), here and everywhere.
@menshikh-iv I've added reference to installation guide (link to repo) in |
I fix & cleanup ldamallet & dtmmodel, main remarks:
So, please make same cleanup for other files + add description, what's stored in file for functions like (for other + for ldamallet & dtm)
|
* Add numpy style docstring * First letter caps in description * Add instalation guide and example * Fix build failures * fix PEP8 * fix dtmmodel * fix dtmmodel[2] * fix dtmmodel[3] * fix ldamallet + typo in dtm * Fix format of installation and docstring mistakes * fix missing docstring in dtm & fix build (wordrank) * fix vw[1] * fix vw[2] * fix varembed * fix wordrank[1] & massive warnings about wrapper * fix wordrank[2]
gensim/models/wrappers/dtmmodel.py
Outdated
Parameters | ||
---------- | ||
dtm_path : str | ||
Path to the dtm executable, e.g. `C:/dtm/dtm-win64.exe`. | ||
Path to the dtm binary, e.g. `/home/username/dtm/dtm/main`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-1: the Windows example was better. Windows users are generally more clueless; Linux ppl can easily do the mental bridge between Windows .exe
=> Linux binary, but Windows users can't.
Or just simply use both examples.
[WIP]
Add docstring.
Description starts with captal letter.
Add installation guide for all wrappers.
Improve example with all initialization.