Coder Social home page Coder Social logo

rule-based-cws's Introduction

中文分词

基于规则实现的简单中文分词

文件

  • main.py:程序主要运行入口
  • data_process.py:处理数据集,获得词表
  • analyze.py:封装句子处理,方法有FMM,RMM,BMM
  • preprocess.py:定义了需要预处理的正则
  • eval.py:用precision,recall,F1来评价分词效果
  • data:用来存放数据集
  • vocab:用来存放词表

额外数据集

  • 30wChinese:30万词中文词表
  • THUOCL:财经,食物,地名,成语数据集
  • English_Cn_Name_Corpus:48万英译中人名
  • places:**行政区划
  • pku_training:人民日报分词语料

运行方法

  1. 运行data_process.py,处理数据集,获得词表,存放在vocab文件夹中

  2. 运行main.py,获得测试集分词结果

评价

测试集F1-Score: 0.92689

rule-based-cws's People

Contributors

retormli avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.