Skip to content

synodriver/pyfriso

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyFriso

usage

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)

About

python binding for friso

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published