Skip to content

suntxy/wordhammer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Chinese text auto-completion

Word Hammer is an implementation of N-Gram model for auto completion.

Usage

from hammer import WordHammer

text = "今天天气真好"
hm = WordHammer()

# train
hm.loadCorpus(corpus=text)

# prediction
hm.doPrediction(sen="今天天气")

# save model
hm.save()

# load model
hm.load()

About

Chinese text auto-completion by N-Gram

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages