Fix documentation for gensim.models.wrappers#1859
Conversation
gensim.models.wrappers
menshikh-iv
left a comment
There was a problem hiding this comment.
Nice start @kakshay21, please continue 👍
| """ | ||
| 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.
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.
sure!, I forgot about it.
| ---------- | ||
| 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.
typical corpus type is iterable of iterable of (int, int)
| Parameters | ||
| ---------- | ||
| dtm_path : str | ||
| path to the dtm executable, e.g. `C:/dtm/dtm-win64.exe`. |
There was a problem hiding this comment.
All descriptions must begin with a capital letter.
|
|
||
| Examples | ||
| -------- | ||
| >>> model = gensim.models.wrappers.DtmModel('dtm-win64.exe', my_corpus, my_timeslices, |
There was a problem hiding this comment.
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]
| ---------- | ||
| 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.
-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.