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

Add a dictionary factory backed by MARISA-tries #133

Merged
merged 2 commits into from
Jun 26, 2024

Commits on Jun 26, 2024

  1. Add a dictionary factory backed by MARISA-tries

    This adds an additional dictionary factory backed by MARISA-tries. This
    dictionary factory on average offers 20x lower memory usage and 100x
    faster initialization time, in exchange for reduced lemmatization and
    language detection performance.
    
    The first time loading a dictionary with the `TrieDictionaryFactory`
    requires more memory and will take a few seconds, as the trie-backed
    dictionary has to be generated on-the-fly from the pickled dict-based
    dictionary first.
    Dunedan committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    ce70e71 View commit details
    Browse the repository at this point in the history
  2. Change dictionary format to use strings again

    This changes the format of the dictionary returned by
    `DictionaryFactory().get_dictionary()` from
    `Dict[ByteString, ByteString]` to `Mapping[str, str] to accommodate
    alternative dictionary factory implementations better and to ease the
    dictionary handling again. This keeps the storage of pickled
    dictionaries with byte strings though, as they're smaller than when
    using strings.
    Dunedan committed Jun 26, 2024
    Configuration menu
    Copy the full SHA
    81f08ba View commit details
    Browse the repository at this point in the history