cosmel.util.word module¶
-
class
cosmel.util.word.
WsWords
(chars)[source]¶ Bases:
collections.abc.Sequence
The sequence of word-segmented words.
Parameters: chars (str) – the text with tag. (the format should be several ‘text(post-tag)’s seperated by <U+3000>s.) -
index
(word, *args)[source]¶ int – returns the index of the first word.
Parameters: word (tuple) – the tuple of text and tag, (optional) and role.
list
– the post-tags.
-
zip2
¶ zip – the zip iterator of the texts and the tags.
-
zip3
¶ zip – the zip iterator of the texts, the tags, and the roles..
-