Code Monkey home page Code Monkey logo

graph4cner's Introduction

Leverage Lexical Knowledge for Chinese Named Entity Recognition via Collaborative Graph Network

GitHub stars GitHub forks

Source code for Leverage Lexical Knowledge for Chinese Named Entity Recognition via Collaborative Graph Network in EMNLP 2019. If you use this code or our results in your research, we would appreciate it if you cite our paper as following:

@article{Sui2019Graph4CNER,
    title = {Leverage Lexical Knowledge for Chinese Named Entity Recognition via Collaborative Graph Network},
    author = {Sui, Dianbo and Chen, Yubo and Liu, Kang and Zhao, Jun and Liu, Shengping},
    journal = {Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing},
    year = {2019}
}

Requirements:

Python: 3.7   
PyTorch: 1.1.0 

Input format:

Input is in CoNLL format (We use BIO tag scheme), where each character and its label are in one line. Sentences are split with a null line.

叶 B-PER
嘉 I-PER
莹 I-PER
先 O
生 O
获 O
聘 O
南 B-ORG
开 I-ORG
大 I-ORG
学 I-ORG
终 O
身 O
校 O
董 O
。 O

Pretrained Embeddings:

Character embeddings (gigaword_chn.all.a2b.uni.ite50.vec) can be downloaded in Google Drive or Baidu Pan.

Word embeddings (sgns.merge.word) can be downloaded in Google Drive or Baidu Pan.

Usage:

1️⃣ Download the character embeddings and word embeddings and put them in the data/embeddings folder.

2️⃣ Modify the run_main.sh by adding your train/dev/test file directory.

3️⃣ sh run_main.sh. Note that the default hyperparameters is may not be the optimal hyperparameters, and you need to adjust these.

4️⃣ Enjoy it! 😄

Result:

For WeiboNER dataset, using the default hyperparameters in run_main.sh can achieve the state-of-art results (Test F1: 66.66%). Model parameters can be download in Baidu Pan (key: bg3q):sunglasses:

Speed:

I have optimized the code and this version is faster than the one in our paper. 💪

graph4cner's People

Contributors

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