Flair applies named entity recognition, sentiment, PoS tagging, and other NLP models to text. It combines word and document embeddings, including Flair and transformer backends.
Overview
Flair is a Python framework for natural language processing developed at Humboldt University of Berlin and contributors. You load pretrained models or train custom sequence taggers and classifiers on your own data using a simple Sentence-and-predict API.
Shipped models cover named entity recognition, sentiment analysis, part-of-speech tagging, sense disambiguation, and classification across many languages, with additional biomedical text support. Embeddings can mix Flair vectors, transformers, and other word or document representations.
Models install via pip and require Python 3.9 or newer. Documentation includes tutorials for basic tagging, training, embeddings, and biomedical corpora. Many sequence models are also published on the Hugging Face model hub for browse and online trial.
The project is open source under the MIT license and cites academic papers for Flair embeddings, the framework, FLERT, and TARS few-shot approaches when those features are used.
Key features
- Pretrained NER and PoS models
- Sentiment classification
- Flair and transformer embeddings
- Biomedical text tooling
- Custom model training
- Multilingual model coverage
- Hugging Face hub integration
- Simple Sentence predict API
Use cases
- Entity extraction from news or logs
- Sentiment on product reviews
- Training domain-specific taggers
- Biomedical entity recognition pipelines