bertNER  by yumath

Chinese NER with BERT for improved accuracy

created 6 years ago
452 stars

Top 67.7% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides a Chinese Named Entity Recognition (NER) system that leverages Google's BERT pre-trained model, enhancing a BiLSTM-CRF architecture. It targets researchers and practitioners working with Chinese NLP tasks, offering improved accuracy and generalization over traditional BiLSTM-CRF models.

How It Works

The system integrates a pre-trained BERT model as the initial embedding layer, feeding its contextualized representations into a BiLSTM-CRF network. This approach captures richer semantic features from Chinese text compared to standard word embeddings, leading to a reported F1 score improvement of over 2% on a benchmark dataset. The BERT embeddings are used as a feature extraction layer, with the option to fine-tune BERT parameters for further accuracy gains.

Quick Start & Requirements

  • Install: python3 train.py (for training), python3 predict.py (for prediction).
  • Prerequisites: Python 3, TensorFlow 1.12, Google's BERT code, and a pre-trained Chinese BERT model.
  • Setup: Requires downloading and placing BERT code and models in the project root.

Highlighted Details

  • Achieved 94.87 F1 on validation and 93.68 on test sets.
  • Demonstrates stronger generalization, effectively handling out-of-vocabulary terms like company names.
  • Suggests fine-tuning BERT parameters and potentially removing BiLSTM for further improvements.

Maintenance & Community

No specific community channels or maintenance activity are detailed in the README.

Licensing & Compatibility

The project appears to be based on Google's BERT code and uses data from another ChineseNER project. Specific licensing for this combined work is not explicitly stated, but compatibility with commercial or closed-source projects would require verification of the underlying BERT and dataset licenses.

Limitations & Caveats

The project is based on TensorFlow 1.12, which is an older version. The README mentions that the current implementation is "Feature Based" and suggests a "Fine-tune" approach could yield further gains, implying the provided code might not be fully optimized for the latest transfer learning techniques.

Health Check
Last commit

4 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.