Golden Horse

Named Entity Recognition for Chinese social media (Weibo). From EMNLP 2015 paper.
Alternatives To Golden Horse
Project NameStarsDownloadsRepos Using ThisPackages Using ThisMost Recent CommitTotal ReleasesLatest ReleaseOpen IssuesLicenseLanguage
Snscrape3,00958 days ago11January 06, 202260gpl-3.0Python
A social networking service scraper in Python
9010 months ago46June 14, 202117mitSwift
MonkeyKing helps you to post messages to Chinese Social Networks.
Sinaweibopy1,2402712 years ago9June 24, 201314apache-2.0Python
新浪微博Python SDK
Social Share Button56992452 years ago45April 05, 202130mitCoffeeScript
Helper for add social share feature in your Rails app. Twitter, Facebook, Weibo, Douban ...
Golden Horse318
3 years ago5Python
Named Entity Recognition for Chinese social media (Weibo). From EMNLP 2015 paper.
7 years ago5Python
graduate project, a weibo spider to find some interesting information such as "In social network , people tend to be happy or sad."
Sfm Ui138
4 months ago95mitPython
Social Feed Manager user interface application.
Social Auth Simulator109
6 years ago4Python
7 years ago10December 13, 20152mitObjective-C
A SNS(Social Networking Services) Share Manager for ios, support Instagram, Facebook, Twitter, Weibo, QQ and Wechat.
a year ago5mitPython
RSS Feed Generator
Alternatives To Golden Horse
Select To Compare

Alternative Project Comparisons

Chinese Named Entity Recognition for Social Media

This repository contains:

  1. Data: Named Entity Recognition (NER) for Chinese Social Media (Weibo). This dataset contains messages selected from Weibo and annotated according to the DEFT ERE annotation guidelines. Annotations include both name and nominal mentions. The corpus contains 1,890 messages sampled from Weibo between November 2013 and December 2014.

  2. golden-horse: A neural based NER tool for Chinese Social Media.

Important update of the data

We fixed some inconsistancies in the data, especially the annotations for the nominal mentions. We thank Hangfeng He for his contribution to the major cleanup and revision of the annotations.

The original and revised annotated data are both made available in the data/ directory, with prefixes weiboNER.conll and weiboNER_2nd_conll, respectively.

We include updated results of our models on the revised version of the data in supplementary material: golden_horse_supplement.pdf. If you want to compare with our models on the revised data, please refer to this supplementary material. Thanks!

Please note that the updated version provided

If you use the revised dataset, please kindly cite the following bibtex in addition to the citation of our papers:

author={Hangfeng He and Xu Sun},
title={F-Score Driven Max Margin Neural Network for Named Entity Recognition in Chinese Social Media.},


The implementation of the papers:

Named Entity Recognition for Chinese Social Media with Jointly Trained Embeddings
Nanyun Peng and Mark Dredze
Conference on Empirical Methods in Natural Language Processing (EMNLP), 2015


Improving Named Entity Recognition for Chinese Social Media
with Word Segmentation Representation Learning

Nanyun Peng and Mark Dredze
Annual Meeting of the Association for Computational Linguistics (ACL), 2016

If you use the code, please kindly cite the following bibtex:

title={Named Entity Recognition for Chinese Social Media with Jointly Trained Embeddings},
author={Peng, Nanyun and Dredze, Mark},
booktitle={Processings of the Conference on Empirical Methods in Natural Language Processing (EMNLP)},
year={2015}, File={}, }

title={Improving named entity recognition for Chinese social media with word segmentation representation learning},
author={Peng, Nanyun and Dredze, Mark},
booktitle={Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (ACL)},
year={2016}, File={}, }


This is an theano implementation; it requires installation of python module:
jieba (a Chinese word segmentor)
Both of them can be simply installed by pip moduleName.

The lstm layer was adapted from and the feature extraction part was adapted from crfsuite:

running the EMNLP_15 experiments:

Sample commands for the training:

python theano_src/ --nepochs 30 --neval_epochs 1 --training_data data/weiboNER.conll.train --valid_data data/ --test_data data/weiboNER.conll.test --emb_file embeddings/weibo_charpos_vectors --emb_type charpos --save_model_param weibo_best_parameters --emb_init true --eval_test False

python theano_src/ --nepochs 30 --neval_epochs 1 --training_data data/weiboNER_2nd_conll.train --valid_data data/ --test_data data/weiboNER_2nd_conll.test --emb_file embeddings/weibo_charpos_vectors --emb_type char --save_model_param weibo_best_parameters --emb_init true --eval_test False

In the above example, the output will be written at output_dir/weiboNER.conll.test.prediction. If you also want to see the evaluation (you must have labeled test data), you can add flag --eval_test True.

Sample commands for running the test:

python theano_src/ --test_data data/weiboNER.conll.test --only_test true --output_dir data/ --save_model_param weibo_best_parameters

running the ACL_16 experiments:

python theano_src/ --cws_train_path data/pku_training.utf8 --cws_valid_path data/pku_test_gold.utf8 --cws_test_path data/pku_test_gold.utf8 --ner_train_path data/weiboNER_2nd_conll.train --ner_valid_path data/ --ner_test_path data/weiboNER_2nd_conll.test --emb_init file --emb_file embeddings/weibo_charpos_vectors --lr 0.05 --nepochs 30 --train_mode joint --cws_joint_weight 0.7 --m1_wemb1_dropout_rate 0.1

The last three parameters and the learning rate can be tuned. In our experiments, we found that for named mention, the best combination is (joint, 0.7, 0.1); for nonimal mention, the best combination is (alternative, 1.0, 0.1)


We noticed that several factors could affect the replicatability of experiments:

  1. the segmentor for preprocessing: we used jieba 0.37
  2. the random number generator. Alghough we fixed the random seed, we noticed it will render slight different numbers on different machine.
  3. the traditional lexical feature used.
  4. the pre-trained embeddings. To enhance the replicatability of our experiments, we provide the original data in conll format at data/weiboNER.conll.(train/dev/test). In addition, we also provide files including all the features and the char-positional transformation we used in our experiments in data/crfsuite.weiboNER.charpos.conll.(train/dev/test), as well as the pre-trained char and char-positional embeddings.

Note: the data we provide contains both named and nominal mentions, you can get the dataset with only named entities by simply filtering out the nominal mentions.

Data License

The annotations in this repository are released according to the Creative Commons Attribution-ShareAlike 3.0 Unported License (CC BY-SA 3.0). The messages themselves are selected from Weibo and follow Weibo's terms of service.

Popular Weibo Projects
Popular Social Projects
Popular Social Media Categories

Get A Weekly Email With Trending Projects For These Categories
No Spam. Unsubscribe easily at any time.