Coder Social home page Coder Social logo

fenci's Introduction

简易中文分词

特点

  1. 字典采用 D.J.B 的 CDB: http://cr.yp.to/cdb.html
  2. 算法用动态规划计算 UNIGRAM 单句最大词频率
  3. 程序很短....

使用

git clone http://github.com/jianingy/fenci
cd fenci
make
mkdir data
wget -O data/people-daily.txt.gz https://nlpbamboo.googlecode.com/files/people-daily.txt.gz
gunzip data/people-daily.txt.gz
out/build -in data/people-daily.txt -user data/user.txt
out/fenci -text 北冰洋汽水真好喝

关于用户自定义字典

用户自定义的词请以行分割方式放在一个文件里,构建字典的时候通过“-user”参数传入。 对于自定义词的词频都采用语料库里单词出现的平均值计算。

问题

因为是简易实现所以有如下问题:

  1. 没法处理人名地名

动机

玩玩...

fenci's People

Contributors

jianingy avatar

Stargazers

白菜林 avatar Zhen Pei avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.