turian / flair-pos-english

Run flair/pos-english on a JSON list of sentence strings

  • Public
  • 52 runs
  • T4
  • GitHub
  • Paper
  • License
Iterate in playground

Input

*string
Shift + Return to add a new line

JSON of list sentence strings, to POS tag and return list of JSON dicts of flair.Sentence

integer

Batch size for flair.predict, default 32

Default: 32

Output

[{"text": "I love berlin.", "all labels": [{"value": "PRP", "confidence": 0.9999994039535522}, {"value": "VBP", "confidence": 0.9999959468841553}, {"value": "NN", "confidence": 0.6081405282020569}, {"value": ".", "confidence": 0.9999886751174927}], "token positions": [[0, 1], [2, 6], [7, 13], [13, 14]]}, {"text": "Deep neural networks are cool.", "all labels": [{"value": "JJ", "confidence": 0.9999175071716309}, {"value": "JJ", "confidence": 0.970643162727356}, {"value": "NNS", "confidence": 0.9999926090240479}, {"value": "VBP", "confidence": 1.0}, {"value": "JJ", "confidence": 0.9999996423721313}, {"value": ".", "confidence": 0.9999958276748657}], "token positions": [[0, 4], [5, 11], [12, 20], [21, 24], [25, 29], [29, 30]]}, {"text": "Geoff Hinton is the father---Yoshua Bengio is the son---Yann LeCun is the holy ghost.", "all labels": [{"value": "NNP", "confidence": 0.9999997615814209}, {"value": "NNP", "confidence": 1.0}, {"value": "VBZ", "confidence": 1.0}, {"value": "DT", "confidence": 1.0}, {"value": "NN", "confidence": 0.9999498128890991}, {"value": ":", "confidence": 0.9369075298309326}, {"value": "NNP", "confidence": 0.9999994039535522}, {"value": "NNP", "confidence": 0.9999998807907104}, {"value": "VBZ", "confidence": 1.0}, {"value": "DT", "confidence": 1.0}, {"value": "NN", "confidence": 0.9999871253967285}, {"value": ":", "confidence": 0.9893242716789246}, {"value": "NNP", "confidence": 0.9999842643737793}, {"value": "NNP", "confidence": 1.0}, {"value": "VBZ", "confidence": 1.0}, {"value": "DT", "confidence": 1.0}, {"value": "JJ", "confidence": 0.9999221563339233}, {"value": "NN", "confidence": 0.9999326467514038}, {"value": ".", "confidence": 0.9999970197677612}], "token positions": [[0, 5], [6, 12], [13, 15], [16, 19], [20, 26], [26, 29], [29, 35], [36, 42], [43, 45], [46, 49], [50, 53], [53, 56], [56, 60], [61, 66], [67, 69], [70, 73], [74, 78], [79, 84], [84, 85]]}]
Generated in

This output was created using a different version of the model, turian/flair-pos-english:27f3a807.

Run time and cost

This model runs on Nvidia T4 GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

The Flair English POS tagger is one of the state of the art models that is commonly available.

It’s based upon Flair embeddings and LSTM-CRF.

In my experience, it outperforms SpaCy en_core_web_trf, but this may depend upon your dataset. However, it is slow unless you have a GPU.

Hence, this replicate model.

Please cite the following paper when using this model.

@inproceedings{akbik2018coling,
  title={Contextual String Embeddings for Sequence Labeling},
  author={Akbik, Alan and Blythe, Duncan and Vollgraf, Roland},
  booktitle = {{COLING} 2018, 27th International Conference on Computational Linguistics},
  pages     = {1638--1649},
  year      = {2018}
}