Skip to content

Nim-NLP/finalseg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

finalseg

Chinese Words Segment Library in Nim based on HMM Model

porting from jieba's finalseg module

Usage

    import finalseg
    import strutils

    let sentence_list = @[
    "姚晨和老凌离婚了",
    "他说的确实在理",
    "长春市长春节讲话"
    ]

    for sentence in sentence_list:
    	for x in cut(sentence)
    	    echo x

    # or
    for sentence in sentence_list:
    	seg_list = lcut(sentence)
    	echo seg_list.join("/ ")

Algorithm

  • Hidden Markov Models, Viterbi

About

jieba's finalseg port to nim

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published