← all repositories
flairNLP/flair

An NLP framework that grades itself against the literature

Flair wraps research-grade NLP models and custom embeddings in a plain PyTorch interface.

14.4k stars Python ML Frameworks
flair
Not currently ranked — collecting fresh signals.
star history

What it does

Flair is a PyTorch-native NLP framework from Humboldt University of Berlin. It offers pre-trained models for tasks like named entity recognition, sentiment analysis, part-of-speech tagging, and biomedical text analysis, plus tools for training your own sequence-labeling models. The library also acts as an embedding laboratory, letting you mix its own contextual string embeddings with standard transformers.

The interesting bit

Most NLP toolkits boast about accuracy without showing their work; Flair publishes a direct scorecard comparing its NER F1 against the best published results on CoNLL-03 and OntoNotes, beating several. It also treats research as a product feature, shipping its own FLERT architecture for document-level NER, TARS for few-shot classification, and dedicated HUNFLAIR biomedical pipelines.

Key highlights

  • Pre-trained NER models for English, German, Dutch, and Spanish with published benchmark comparisons against literature scores
  • Direct PyTorch integration with a high-level API based around Sentence and Classifier objects
  • Models hosted on the Hugging Face hub with interactive online demos
  • Dedicated biomedical NER support and tutorials via HUNFLAIR
  • Ability to combine and compare multiple embedding strategies, including Flair’s own contextual string embeddings and transformer models

Caveats

  • The official book Natural Language Processing with Flair targets an older release, so some code examples may no longer work

Verdict

Grab it if you need a research-backed PyTorch toolkit for sequence labeling or biomedical NER with transparent benchmarks. Skip it if you are looking for a minimal, single-purpose inference library; Flair’s scope is deliberately broad.

Frequently asked

What is flairNLP/flair?
Flair wraps research-grade NLP models and custom embeddings in a plain PyTorch interface.
Is flair open source?
Yes — flairNLP/flair is an open-source project tracked on heatdrop.
What language is flair written in?
flairNLP/flair is primarily written in Python.
How popular is flair?
flairNLP/flair has 14.4k stars on GitHub.
Where can I find flair?
flairNLP/flair is on GitHub at https://github.com/flairNLP/flair.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.