sudachipy.morpheme package

Note

  • Import from sudachipy.morpheme is deprecated.
    • Use from sudachipy import Morpheme instead.

  • Method Morpheme.get_word_info(self) -> WordInfo is deprecated.

Module contents

class sudachipy.morpheme.Morpheme
begin($self) int

Returns the begin index of this in the input text

dictionary_form($self) str

Returns the dictionary form

dictionary_id($self) int

Returns the dictionary id which this word belongs

end($self) int

Returns the end index of this in the input text

get_word_info($self) sudachipy.WordInfo

Returns the word info

is_oov($self) bool

Returns whether if this is out of vocabulary word

normalized_form($self) str

Returns the normalized form

part_of_speech()

Returns the part of speech as a six-element tuple. Tuple elements are four POS levels, conjugation type and conjugation form.

part_of_speech_id($self) int

Returns the id of the part of speech in the dictionary

raw_surface($self) str

Returns the substring of input text corresponding to the morpheme regardless the configured projection

reading_form($self) str

Returns the reading form

split($self, mode, out = None, add_single = False) sudachipy.MorphemeList

Returns sub-morphemes in the provided split mode.

Parameters:
surface($self) str

Returns the substring of input text corresponding to the morpheme, or a projection if one is configured

synonym_group_ids($self) List[int]

Returns the list of synonym group ids

word_id($self) int

Returns word id of this word in the dictionary