Skip to content
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

LsiModel: Only log top words that actually exist in the dictionary #3091

Merged
merged 5 commits into from
Apr 9, 2021

Commits on Mar 25, 2021

  1. lsimodel: Only log top words that actually exist in <id2word>

    In some pathological cases, we might try to log the top N words, even
    though we haven't seen N words yet.  In these cases, we can just exit
    the loop early.
    
    Closes piskvorky#3090.
    kmurphy4 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    8f8cb49 View commit details
    Browse the repository at this point in the history
  2. utils: Implement FakeDict::__contains__()

    In 8f8cb49, I added a check that checks
    
        val in self.id2word
    
    When testing, `id2word` is actually an instance of `FakeDict`, which
    doesn't implement `__contains__()` (so Python falls back to calling
    `__getitem__()`[1]).  The tests didn't like this[2].
    
    [1] https://docs.python.org/3.6/reference/datamodel.html#object.__contains__
    [2] https://github.com/RaRe-Technologies/gensim/runs/2197137529
    kmurphy4 committed Mar 25, 2021
    Configuration menu
    Copy the full SHA
    fe061f7 View commit details
    Browse the repository at this point in the history

Commits on Apr 1, 2021

  1. Update lsimodel.py

    mpenkov committed Apr 1, 2021
    Configuration menu
    Copy the full SHA
    6ad9325 View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2021

  1. Update CHANGELOG.md

    mpenkov committed Apr 9, 2021
    Configuration menu
    Copy the full SHA
    d7d1667 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    22b5f6d View commit details
    Browse the repository at this point in the history