finalseg

jieba's finalseg port to nim

Readme

finalseg

Chinese Words Segment Library in Nim based on HMM Model

porting from jiba'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
Need help? Read Nimble
Author:
bung87
No tagged versions available
License: MIT

Project website Hosted docs