Skip to content

Conversation

@menshikh-iv
Copy link
Contributor

@menshikh-iv menshikh-iv commented Nov 22, 2017

We want to have "immutable" data in gensim-data repository (i.e. api.load("anyname") must return always exactly same data), but some dataset/models periodically updated and we want to support new versions (for example - wikipedia).

For this reason, I added show_only_latest flag to info function, this allows showing only latest version of datasets (for example, if we have wiki-english-20170101 and wiki-english-20170201 in storage, only wiki-english-20170201 will be showed).
Besides, the old version will be showed if show_only_latest==False and can be loaded always (by name).

return information

return {
"corpora": {name: data for (name, data) in information['corpora'].items() if data.get("latest", True)},
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the default be True?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, It is much easier when the new version is loaded set latest: False for the old version, instead of set latest flag to all data as the required field.

@piskvorky
Copy link
Owner

LGTM (but fill in the PR description with motivation please).

@menshikh-iv menshikh-iv merged commit 5bb6eab into develop Nov 22, 2017
@menshikh-iv menshikh-iv deleted the fix-downloader-links branch November 22, 2017 14:46
VaiyeBe pushed a commit to VaiyeBe/gensim that referenced this pull request Nov 26, 2017
…ky#1736)

* Deduplicate links

* Add 'actual' flag for hiding outdated data

* fix type

* rename option
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants