kalawinka's picture
Update README.md
9b4a8f3
|
raw
history blame
1.92 kB
---
language:
- en
library_name: flair
pipeline_tag: token-classification
---
# English NER model for extraction of named entities from scientific acknowledgement texts using Flair Embeddings
<!-- Provide a quick summary of what the model is/does. -->
F1-Score: 0.79
Predicts 6 tags:
|label|description|precision|recall|f1-score|support|
|:----|:----|:----|:----|:----|:----|
|GRNB|grant number|0,93|0,98|0,96|160|
|IND|person|0,98|0,98|0,98|295|
|FUND|funding organization|0,70|0,83|0,76|157|
|UNI|university|0,77|0,74|0,75|99|
|MISC|miscellaneous|0,65|0,65|0,65|82|
|COR|corporation|0,75|0,50|0,60|12|
Based on [Flair embeddings](https://aclanthology.org/C18-1139/)
# Usage
Requires: [Flair](https://github.com/flairNLP/flair/) (pip install flair)
```python
#import libraries
from flair.data import Sentence
from flair.models import SequenceTagger
# load the trained model
model = SequenceTagger.load("kalawinka/flair-ner-acknowledgments")
# create example sentence
sentence = Sentence("This work was supported by State Key Lab of Ocean Engineering Shanghai Jiao Tong University and financially supported by China National Scientific and Technology Major Project (Grant No. 2016ZX05028-006-009)")
# predict the tags
model.predict(sentence)
#print output as spans
for entity in sentence.get_spans('ner'):
print(entity)
```
This produces the following output:
```
```
[See our Google colab notebook](https://colab.research.google.com/drive/1Wz4ae5c65VDWanY3Vo-fj__bFjn-loL4?usp=sharing#scrollTo=2ZRSrcjuFMHO)
# Citation
if you use this model, please consider citing this work:
```
@misc{smirnova2023embedding,
title={Embedding Models for Supervised Automatic Extraction and Classification of Named Entities in Scientific Acknowledgements},
author={Nina Smirnova and Philipp Mayr},
year={2023},
eprint={2307.13377},
archivePrefix={arXiv},
primaryClass={cs.DL}
}
```