Skip to content

A neural network model for Chinese named entity recognition

Notifications You must be signed in to change notification settings

zuofengli/ChineseNER

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Recurrent neural networks for Chinese named entity recognition in TensorFlow

This repository contains a neural network model for chainese named entity recognition.

Contributer

Requirements

Model

The model is a birectional LSTM neural network with a CRF layer. Sequence of chinese characters are projected into sequence of dense vectors, and concated with extra features as the inputs of recurrent layer, here we employ one hot vectors representing word boundary features for illustration. The recurrent layer is a bidirectional LSTM layer, outputs of forward and backword vectors are concated and projected to score of each tag. A CRF layer is used to overcome label-bias problem.

Basic Usage

Default parameters:

  • batch size: 20
  • gradient clip: 5
  • optimizer: Adam
  • dropout rate: 0.5
  • basic learning rate: 0.001

We train word vectors with gensim version of word2vec on Chinese WiKi corpus and finetune the embedding layer

Train the model with default parameters:

$ python3 train.py

the best F1 score is 0.8948 when tested, a f1 score higher than 0.89 is reasonable

About

A neural network model for Chinese named entity recognition

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 68.3%
  • Perl 31.7%