English NER (7 classes) β€” Flukes

Named entity recognition for English text. Predicts seven entity types:

Label Description
PER Person names
ORG Organization names
LOC Locations (cities, countries, geographical features)
EVENT Named events (elections, wars, conferences, ...)
PRODUCT Named products
WORK_OF_ART Books, films, songs, paintings, ...
MISC All other entities (nationalities, languages, etc.)

⚠️ Default license: noncommercial use only. This model is released under the Flukes NC 1.0 License. Commercial use β€” including using this model's predictions in a commercial product or service β€” requires a separate license. Contact alan.akbik@hu-berlin.de.


Use

Install flukes:

pip install flukes

Then:

from flukes.models import Model

# load the named entity recognition (NER) model
model = Model.load("ner")

# the text you would like to tag
text = "Washington bought himself a pair of Nike Vaporflys.\n\nHe wore them at the Berlin Marathon."

# predict tags for the model
doc = model.predict(text)

# print the document with tags
print(doc)

Output:

Document[89]: Washington bought himself a pair of Nike Vaporflys.
              ╰───PER──╯                          ╰───PRODUCT──╯

              He wore them at the Berlin Marathon.
                                  ╰────EVENT────╯

Access Annotations

You can also access all annotations directly:

from flukes.models import Model

# load the named entity recognition (NER) model
model = Model.load("ner")

# the text you would like to tag
text = "Washington bought himself a pair of Nike Vaporflys.\n\nHe wore them at the Berlin Marathon."

# predict tags for the model
doc = model.predict(text)

# iterate over spans and print information
for span in doc.spans:
    print(f"{span.text!r:30}  {span.label}  ({span.score:.2f})")

Output:

'Washington'                    PER  (1.00)
'Nike Vaporflys'                PRODUCT  (1.00)
'Berlin Marathon'               EVENT  (1.00)

Performance

This model scores 96.1 F1 on our internal test sets.

License

Model weights: Flukes Noncommercial License 1.0. Personal, academic, and other noncommercial use permitted. Commercial use requires a separate license β€” contact alan.akbik@hu-berlin.de.

Flukes library code: Apache 2.0.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ 2 Ask for provider support

Spaces using flair/ner-english-large 25