--- id: flair version: "0.15.1" license: MIT license_treatment: permissive maintenance: aging --- # flair — A very simple framework for state-of-the-art NLP License: permissive · Maintenance: aging · Downloads: 234.3K/mo ## What it is and what it does Flair is a PyTorch-based NLP framework that wraps state-of-the-art transformer and contextual models to make common NLP tasks accessible through a simple API. It ships with pre-trained models for named entity recognition, sentiment analysis, part-of-speech tagging, and biomedical text analysis across multiple languages, and allows you to load, apply, and combine embeddings without writing low-level PyTorch code. The framework is built for both practitioners who want to apply existing models to text and researchers who want to train custom models. It depends on torch, transformers, huggingface-hub, and a large ecosystem of supporting libraries (scikit-learn, matplotlib, lxml, and others) to handle data loading, visualization, and model evaluation. The aging maintenance status (last release 555 days ago) means you should verify compatibility with your target PyTorch and transformer versions before committing to production use. Use it for: - Extract named entities (persons, locations, organizations) from English, German, Dutch, Spanish, or other language text using pre-trained models. - Classify sentiment in text as positive or negative without training a custom model. - Generate word and document embeddings for downstream machine learning tasks using Flair embeddings or transformer models. - Train a custom sequence labeling model (NER, PoS tagging) on your own annotated dataset using the PyTorch framework. - Analyze biomedical or clinical text using specialized models and datasets designed for domain-specific NLP. - Combine multiple embeddings (word, document, transformer) and experiment with new architectures for sequence labeling. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Flair is a PyTorch-based NLP framework that applies pre-trained models for named entity recognition, sentiment analysis, part-of-speech tagging, and other sequence labeling tasks, plus text embedding and model training capabilities. Yes, if you need a high-level NLP framework with pre-trained models and your Python and PyTorch versions align with the package's requirements. The low install friction, permissive license, and strong community adoption (14382 stars) make it a solid choice for NER, sentiment analysis, and embeddings. However, verify that the aging maintenance status (555 days since last release) does not conflict with your dependency update cycles, and test compatibility with your target PyTorch and transformer versions before production deployment. ## Install pip install flair uv add flair poetry add flair ## Installing flair Before you install: Low install friction with a pure-Python wheel. The package has 25 runtime dependencies including torch, transformers, and huggingface-hub, which are substantial but standard for modern NLP work. Maintenance status is aging—last release was 555 days ago—though the repository remains active with recent commits and 14382 stars. License in practice: MIT license is permissive and imposes no restrictions on commercial or private use, modification, or redistribution. Quickstart: pip install flair from flair.data import Sentence from flair.nn import Classifier sentence = Sentence('I love Berlin .') tagger = Classifier.load('ner') tagger.predict(sentence) print(sentence) Requires Python 3.9+. Installing torch and transformers dependencies may take time and disk space; GPU support is optional but recommended for production use. Verify before relying: - Whether the 555-day gap since last release indicates active maintenance or reduced development velocity. - Performance characteristics and memory requirements for large-scale inference or training. - Compatibility with the latest transformer model releases and huggingface-hub API changes. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 234.3K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags named entity recognition NER, sentiment analysis NLP, part-of-speech tagging, text embeddings framework, sequence labeling PyTorch, biomedical NLP models, transformer embeddings, NLP model training, nlp-framework, sequence-labeling, transformers [View on SkillFed](https://skillfed.io/packages/flair) · [View on PyPI](https://pypi.org/project/flair/)