The format is based on Keep a Changelog.
- Print Debug feature is disabled now.
-d
option ofsudachipy
cli does nothing.sudachipy.Tokenizer
will ignore the provided logger.- Ref: [#76]
- Changed path resolution algorithm for resources #203
- Added set operations to
PosMatcher
#204 - Added
pos_of()
function toDictionary
which returns a POS tuple for a given POS id.
- Fixed analysis differences with 0.5.4
Morpheme.part_of_speech
method now returns Tuple of POS components instead of a list.- Partial Dictionary Read
- It is possible to ask for a subset of morpheme fields instead of all fields
- Supported API:
Dictionary.create()
,Dictionary.pre_tokenizer()
- HuggingFace PreTokenizer support
- We provide a built-in HuggingFace-compatible pre-tokenizer
- API:
Dictionary.pre_tokenizer()
- It is multithreading-compatible and supports customization
- Memory allocation reuse
- It is possible to reduce re-allocation overhead by using
out
parameters which acceptMorphemeList
s - Supported API:
Tokenizer.tokenize()
,Morpheme.split()
- It is now a recommended way to use both those APIs
- It is possible to reduce re-allocation overhead by using
- PosMatcher
- New API for checking if a morpheme has a POS tag from a set
- Strongly prefer using it instead of string comparison of POS components
- Performance
- Greatly decreased cost of accessing POS components
len(Morpheme)
now returns the length of the morpheme in Unicode codepoints. Use it instead oflen(m.surface())
Morpheme.split()
has newadd_single
parameter, which can be used to check whether the split has produced anything- E.g. with
if m.split(SplitMode.A, out=res, add_single=False): handle_splits(res)
add_single=True
, returning the list with the current morpheme is the current behavior
- E.g. with
Morpheme
/MorphemeList
now have readable__repr__
and__str__
dict_type
parameter ofDictionary()
constructor. Usedict
instead which is a complete alias.
- Do not use
mode
parameter ofTokenizer.tokenize()
method if you always tokenize with a single mode.- Use the mode parameter of
Dictionary.create()
method instead.
- Use the mode parameter of
- Support building dictionary
sudachidict_*
packages starting from 20210802.post1 are compatible with 0.6.0 release and will work as is
- From this version, SudachiPy is provided as a binding of the Rust implementation.
- See API reference page for all APIs.
- Since this is release-candidate version, you need to explicitly specify version to install.
pip install sudachipy==0.6.0rc1
- You also need to install
sudachidict_*
before since installing it will overwrite this version.
- Module structure changed: every classes locate at the root module.
- Import is now like:
from sudachipy import Dictionary, Tokenizer
- You can still import them in the previous way (not recommended).
from sudachipy.dictionary import Dictionary
- Import is now like:
MorphemeList.empty
now needs asudachipy.Dictionary
instance as arguments.- This method is also marked as deprecated.
MorphemeList.empty(dict)
- Users should not generate MorphemeList by themselves.
- Use
Tokenizer.tokenize("")
if you need.
Morpheme.get_word_info()
- Users should not touch the raw WordInfo.
- Necessary fields are provided via
Morpheme
.- Please create an issue if fields you need is not implemented to
Morpheme
.
- Please create an issue if fields you need is not implemented to
Morpheme.split(mode)
- The API around this feature will change.
- See issue [#92].
- Some of APIs are not supported.
- See API reference page for the full list of supported APIs.
- Most of instance attributes are unaccessible.
- You cannot access
Dictionary.grammar
orDictionary.lexicon
.
- You cannot access
Please see python version repository.