GithubHelp home page GithubHelp logo

liyueyan123 / chinese-ner Goto Github PK

View Code? Open in Web Editor NEW

This project forked from genezc/chinese-ner

0.0 0.0 0.0 111.57 MB

A practice on Chinese Named Entity Recognition

Shell 0.73% C++ 43.71% Python 29.55% C 24.98% Makefile 1.04%

chinese-ner's Introduction

Chinese-NER

An attempt to do better on Chinese NER task.

Reference & Inspiration

Requirement

  • Tensorflow
  • pynlpir
  • jieba

Usage

Note: Current repo only contains Version 1 which is discussed in Experiments, but you could easily modify the cofigurations in main.py to have the Baseline set in Experiments

  1. Preprocess the dataset, whose format should be the same as the examples in /data. And the code in preprocess.py shall be considered as the refernce.
  2. Yield a character-level embedding with Glove or fastText. Refer to the README.md in /Glove and /fastText to gain an intuition.
  3. Modify configurations in main.py to get a brand new config suiting your idea.
  4. Train your own model by
python main.py --train=True
  1. Evaluate the outcome of your model by
python main.py

Contributions

If you have any question about this repo or you find some problems in my code, feel free to contact with me via email or just give comments in Issues.

Experiments

Baseline

  • Corpus: MSRA

  • Tag schema: iobes

    我 S-PER
    来 O
    自 O
    北 B-ORG
    京 I-ORG
    理 I-ORG
    工 I-ORG
    大 I-ORG
    学 E-ORG

  • Dataset split

    90% train, 10% test

  • Structure

    • with pretrained GloVe embedding for characters and random initialized embedding for segmentations
    • concatenate above two
    • Bi-LSTM
    • CRF loss layer
  • Result(Test only)

    Type Accuracy Precision Recall FB1
    LOC \ 94.11% 90.58% 92.31
    ORG \ 86.86% 88.43% 87.64
    PER \ 92.21% 92.45% 92.33
    OVER ALL 98.79% 91.89% 90.71% 91.30

Version 1 (Bi-LSTM + CRF + CHAR_CNN)

  • Corpus: SAME as baseline

  • Tag schema: iobes

    我 S-PER
    来自 O
    北京 B-ORG
    理工 I-ORG
    大学 E-ORG

  • Dataset split: SAME as baseline

  • Structure

    • with pretrained GloVe embedding for words
    • use a layer of CNN to capture the features of characters projected by embedding
    • Bi-LSTM
    • CRF loss layer
  • Result(Test only)

    Type Accuracy Precision Recall FB1
    LOC \ 93.31% 91.14% 92.21
    ORG \ 87.15% 86.63% 86.89
    PER \ 93.94% 91.94% 92.93
    OVER ALL 98.83% 92.17% 90.42% 91.29

chinese-ner's People

Contributors

genezc 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.