from friso import Friso, Task, Config, StringSplit
import friso
f = Friso()
t = Task()
c = Config()
f.init_from_ifile(c, "friso.ini")
c.set_mode(friso.MODE_COMPLEX)
t.set_text("分词的文本")
while c.next_token(f, t):
print(t.token.rlen)
print(t.token.word.decode())
print(t.token.offset)
print(t.token.length)
print("-----------------------")
sp = StringSplit(b",", b",I am a chinese,,my name is Lion,and i am the author of friso,bug report email [email protected],qq:1187582057")
buffer = bytearray(128)
while sp.split_next(buffer) is not None:
print(buffer)
-
Notifications
You must be signed in to change notification settings - Fork 1
synodriver/pyfriso
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
python binding for friso
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published