ckipnlp.util.ws module¶
-
class
ckipnlp.util.ws.
WsWord
[source]¶ Bases:
ckipnlp.util.ws._WsWord
A word-segmented word.
- Fields:
- word (str): the word.
- pos (str): the post-tag.
-
classmethod
from_text
(text)[source]¶ Create
WsWord
object fromckipnlp.ws.CkipWs
output.
-
class
ckipnlp.util.ws.
WsSentence
(initlist=None)[source]¶ Bases:
collections.UserList
A word-segmented sentence.
- Items:
WsWord
: the words.
-
classmethod
from_text
(text)[source]¶ Create
WsSentence
object fromckipnlp.ws.CkipWs
output.