资源算法BERT-NER-CoNLL

BERT-NER-CoNLL

2020-02-18 | |  35 |   0 |   0

PyTorch implementation for NER with CoNLL 2003 using pre-trained BERT

This repository tries to replicate BERT's results on CoNLL 2003 NER task.

With BERT-BASE-CASED, the result is as follows on eval set:

           precision    recall  f1-score   support

      LOC       0.97      0.97      0.97      1837
     MISC       0.89      0.92      0.90       922
      PER       0.97      0.98      0.98      1836
      ORG       0.92      0.94      0.93      1341

micro avg       0.95      0.96      0.95      5936
macro avg       0.95      0.96      0.95      5936

On the test set:

           precision    recall  f1-score   support

      PER       0.96      0.95      0.96      1615
      LOC       0.92      0.93      0.93      1666
     MISC       0.80      0.83      0.82       702
      ORG       0.88      0.91      0.89      1661

micro avg       0.91      0.92      0.91      5644
macro avg       0.91      0.92      0.91      5644

To reproduce:

 python train.py --batch_size 32 --lr 3e-5 --n_epochs 5 --train

Credits: Google Colab was used to build this - this repo is just the cleaner version. The original notebook is here

Key ideas to get this working are due to this github issue/comment.






上一篇:Chinese-NER-With-Bert

下一篇:Bert-Bilstm-CRF-for-ner

用户评价
全部评价

热门资源

  • seetafaceJNI

    项目介绍 基于中科院seetaface2进行封装的JAVA...

  • spark-corenlp

    This package wraps Stanford CoreNLP annotators ...

  • Keras-ResNeXt

    Keras ResNeXt Implementation of ResNeXt models...

  • capsnet-with-caps...

    CapsNet with capsule-wise convolution Project ...

  • inferno-boilerplate

    This is a very basic boilerplate example for pe...