sudachipy.morphemelist package

Note

  • Import from sudachipy.morphemelist is deprecated.
    • Use from sudachipy import MorphemeList instead.

  • Class Method MorphemeList.empty() -> MorphemeList is deprecated.
    • Use Tokenizer.tokenize("") if you need.

Module contents

class sudachipy.morphemelist.MorphemeList

A list of morphemes.

An object can not be instantiated manually. Use Tokenizer.tokenize(“”) to create an empty morpheme list.

empty(dict: Dictionary) MorphemeList

Returns an empty morpheme list with dictionary.

Deprecated since version 0.6.0: Use Tokenizer.tokenize(“”) if you need.

get_internal_cost(self, /) int

Returns the total cost of the path.

size(self, /) int

Returns the number of morpheme in this list.