Repository navigation
Releases
Releases · savannstm/language-tokenizer
v0.4.2
v0.4.0
Changes
- Embedded-dictionary features restructured -
japanese-ipadic-neologd-lindera,japanese-ipadic-lindera, andjapanese-unidic-linderano longer exist - usejapanese-linderaplus one (or more) ofjapanese-lindera-embed-ipadic,japanese-lindera-embed-ipadic-neologd,japanese-lindera-embed-unidic. Likewise,chinese-lindera/korean-linderaalone no longer bundle a dictionary - addchinese-lindera-embed/korean-lindera-embedfor the old always-embedded behavior. fullno longer embeds anything - It now enablesjapanese-lindera/chinese-lindera/korean-linderain their new runtime-path-loading form, not the old always-bundledipadic-neologd/cc-cedict/ko-dic. If you relied onfullproducing a working CJK tokenizer out of the box, add the matching*-embed-*features or callset_dictionary_path.- Note that embedding dictionaries is heavy, especially ipadic-neologd.
- Dictionaries can now be loaded from disk at runtime - instead of only from an embedded copy:
set_dictionary_path(algorithm, Some(path)). This is the new default behavior forjapanese-lindera/chinese-lindera/korean-lindera- enabling one of them alone no longer bundles anything into the binary (a huge size win:ipadic-neologdalone was adding well over a gigabyte). - Multiple embedded Japanese dictionaries can coexist. -
japanese-lindera-embed-ipadic,-ipadic-neologd, and-unidicare independent and additive now, not mutually exclusive. Which one is actually used is a runtime choice via the newset_japanese_embedded_dictionary(JapaneseDictionaryKind)- auto-picks the best one compiled in (ipadic-neologd>unidic>ipadic) if never called. - New
Error::NoDictionaryvariant: returned when a CJK language is tokenized with no path set and no matching dictionary compiled in, instead of panicking.