This repository contains a simple demo for chainese named entity recognition.
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.
Our model is similar to the state-of-the-art Chinese named entity recognition model proposed in Character-Based LSTM-CRF with Radical-Level Features for Chinese Named Entity Recognition.
Word vectors are trained with gensim version of word2vec on Chinese WiKi corpus, provided by Chuanhai Dong.
$ python3 main.py --train=True --clean=True
$ python3 main.py
$ claude mcp add ChineseNER \
-- python -m otcore.mcp_server <graph>