Architecture | CRF, Convolution, Dropout, ELMo, Feedforward Network, Highway Layer, LSTM, Linear Layer, Tanh, Variational Dropout |
---|---|
LR | 0.001 |
SHOW MORE |
This model identifies a broad range of 16 semantic types in the input text. It is a reimplementation of Lample (2016) and uses a biLSTM with a CRF layer, character embeddings and ELMo embeddings.
Explore live Named Entity Recognition demo at AllenNLP.
from allennlp_models.pretrained import load_predictor
predictor = load_predictor("tagging-fine-grained-crf-tagger")
sentence = "Jobs and Wozniak cofounded Apple in 1976."
preds = predictor.predict(sentence)
for word, tag in zip(preds["words"], preds["tags"]):
print(word, tag)
# prints:
# Jobs O
# and O
# Wozniak U-PERSON
# cofounded O
# Apple U-ORG
# in O
# 1976 U-DATE
# . O
You can also get predictions using allennlp command line interface:
echo '{"sentence": "Jobs and Wozniak cofounded Apple in 1976."}' | \
allennlp predict https://storage.googleapis.com/allennlp-public-models/fine-grained-ner.2021-02-11.tar.gz -
To evaluate the model on Ontonotes 5.0 run:
allennlp evaluate https://storage.googleapis.com/allennlp-public-models/fine-grained-ner.2021-02-11.tar.gz \
/path/to/dataset
To train this model you can use allennlp
CLI tool and the configuration file fine-grained-ner.jsonnet:
allennlp train fine-grained-ner.jsonnet -s output_dir
See the AllenNLP Training and prediction guide for more details.
@article{Lample2016NeuralAF,
author = {Guillaume Lample and Miguel Ballesteros and Sandeep Subramanian and K. Kawakami and Chris Dyer},
journal = {ArXiv},
title = {Neural Architectures for Named Entity Recognition},
volume = {abs/1603.01360},
year = {2016}
}
BENCHMARK | MODEL | METRIC NAME | METRIC VALUE | GLOBAL RANK |
---|---|---|---|---|
Ontonotes v5 (English) | Fine Grained Named Entity Recognition | F1 | 88 | # 1 |