Git Product home page Git Product logo

chinese_segmentation's Introduction

Chinese Segmentation

Requirements

data

Raw corpus

people2014.tar.gz

Processed dictionary

people.dict.pkl

python dict_utils.py

Models

Matching Based Methods

python test_matching.py

Hidden Markov Models

python test_hmm.py

Conditional Random Field

BiGRU + CRF Epoch 37/100 2157/2157 [==============================] - 77s 36ms/step - loss: 4.7686 - accuracy: 0.9585 - val_loss: 5.4757 - val_accuracy: 0.9419

Model: "bi_rnncrf"


Layer (type) Output Shape Param #

embedding (Embedding) multiple 253184


bidirectional (Bidirectional multiple 18816


dense (Dense) multiple 165


crf (CRF) multiple 25

Total params: 272,190 Trainable params: 272,190 Non-trainable params: 0


None

Train done! Lasts: 3253.28s

BiLSTM + Attention

Epoch 32/100 2157/2157 [==============================] - 68s 31ms/step - loss: 0.1030 - acc: 0.7230 - val_loss: 0.1610 - val_acc: 0.7040

Model: "bi_rnn_attention"


Layer (type) Output Shape Param #

embedding (Embedding) multiple 253184


bidirectional (Bidirectional multiple 18816


attention (Attention) multiple 3168


dense (Dense) multiple 165

Total params: 275,333 Trainable params: 275,333 Non-trainable params: 0


None

Train done! Lasts: 2578.73s

Performance

model precision recall f1_score note
bimm 0.9121 0.9536 0.9324
hmm 0.6921 0.6899 0.6910
jieba 0.8151 0.8092 0.8122
bilstm 0.8849 0.8701 0.8774
bigru+crf 0.8857 0.8760 0.8808 epochs=37
bilstm+attention 0.8439 0.7701 0.8053 epoch is about 10, not converge yet
bilstm+attention 0.8581 0.7850 0.8199 epochs=32
BERT
BERT+CRF

chinese_segmentation's People

Contributors

feynmanma7 avatar

Watchers

 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.