Skip to content

Commit 2fde646

Browse files
authored
Merge pull request flairNLP#2134 from flairNLP/flairNLPGH-2132-prepare-0.8
flairNLPGH-2132: prepare 0.8 release
2 parents acce28b + 8d5b7e6 commit 2fde646

File tree

7 files changed

+125
-121
lines changed

7 files changed

+125
-121
lines changed

README.md

Lines changed: 41 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,44 @@
77

88
A very simple framework for **state-of-the-art NLP**. Developed by [Humboldt University of Berlin](https://www.informatik.hu-berlin.de/en/forschung-en/gebiete/ml-en/) and friends.
99

10-
* __IMPORTANT: (30.08.2020)__ *We moved our models to a new server. Please update your Flair to the newest version!*
11-
1210
---
1311

1412
Flair is:
1513

1614
* **A powerful NLP library.** Flair allows you to apply our state-of-the-art natural language processing (NLP)
17-
models to your text, such as named entity recognition (NER), part-of-speech tagging (PoS),
15+
models to your text, such as named entity recognition (NER), part-of-speech tagging (PoS),
16+
special support for [biomedical data](/resources/docs/HUNFLAIR.md),
1817
sense disambiguation and classification, with support for a rapidly growing number of languages.
1918

20-
* **A biomedical NER library.** Flair has special support for [biomedical data](/resources/docs/HUNFLAIR.md) with
21-
state-of-the-art models for biomedical NER and support for over 32 biomedical datasets.
22-
2319
* **A text embedding library.** Flair has simple interfaces that allow you to use and combine different word and
2420
document embeddings, including our proposed **[Flair embeddings](https://www.aclweb.org/anthology/C18-1139/)**, BERT embeddings and ELMo embeddings.
2521

2622
* **A PyTorch NLP framework.** Our framework builds directly on [PyTorch](https://pytorch.org/), making it easy to
2723
train your own models and experiment with new approaches using Flair embeddings and classes.
2824

29-
Now at [version 0.7](https://github.com/flairNLP/flair/releases)!
30-
31-
## Comparison with State-of-the-Art
32-
33-
Flair outperforms the previous best methods on a range of NLP tasks:
25+
Now at [version 0.8](https://github.com/flairNLP/flair/releases)!
3426

35-
| Task | Language | Dataset | Flair | Previous best |
36-
| ------------------------------- | --- | ----------- | ---------------- | ------------- |
37-
| Named Entity Recognition |English | Conll-03 | **93.18** (F1) | *92.22 [(Peters et al., 2018)](https://arxiv.org/pdf/1802.05365.pdf)* |
38-
| Named Entity Recognition |English | Ontonotes | **89.3** (F1) | *86.28 [(Chiu et al., 2016)](https://arxiv.org/pdf/1511.08308.pdf)* |
39-
| Emerging Entity Detection | English | WNUT-17 | **49.49** (F1) | *45.55 [(Aguilar et al., 2018)](http://aclweb.org/anthology/N18-1127.pdf)* |
40-
| Part-of-Speech tagging |English| WSJ | **97.85** | *97.64 [(Choi, 2016)](https://www.aclweb.org/anthology/N16-1031)*|
41-
| Chunking |English| Conll-2000 | **96.72** (F1) | *96.36 [(Peters et al., 2017)](https://arxiv.org/pdf/1705.00108.pdf)*
42-
| Named Entity Recognition | German | Conll-03 | **88.27** (F1) | *78.76 [(Lample et al., 2016)](https://arxiv.org/abs/1603.01360)* |
43-
| Named Entity Recognition |German | Germeval | **84.65** (F1) | *79.08 [(Hänig et al, 2014)](http://asv.informatik.uni-leipzig.de/publication/file/300/GermEval2014_ExB.pdf)*|
44-
| Named Entity Recognition | Dutch | Conll-02 | **92.38** (F1) | *81.74 [(Lample et al., 2016)](https://arxiv.org/abs/1603.01360)* |
45-
| Named Entity Recognition |Polish | PolEval-2018 | **86.6** (F1) <br> [(Borchmann et al., 2018)](https://github.com/applicaai/poleval-2018) | *85.1 [(PolDeepNer)](https://github.com/CLARIN-PL/PolDeepNer/)*|
27+
## State-of-the-Art Models
4628

47-
Here's how to [reproduce these numbers](/resources/docs/EXPERIMENTS.md) using Flair. You can also find detailed evaluations and discussions in our papers:
29+
Flair ships with state-of-the-art models for a range of NLP tasks. For instance, check out our latest NER models:
4830

49-
* *[Contextual String Embeddings for Sequence Labeling](https://www.aclweb.org/anthology/C18-1139/).
50-
Alan Akbik, Duncan Blythe and Roland Vollgraf.
51-
27th International Conference on Computational Linguistics, **COLING 2018**.*
31+
| Language | Dataset | Flair | Best published | Model card & demo
32+
| --- | ----------- | ---------------- | ------------- | ------------- |
33+
| English | Conll-03 (4-class) | **94.09** | *94.3 [(Yamada et al., 2018)](https://doi.org/10.18653/v1/2020.emnlp-main.523)* | [Flair English 4-class NER demo](https://huggingface.co/flair/ner-english-large) |
34+
| English | Ontonotes (18-class) | **90.93** | *91,3 [(Yu et al., 2016)](https://www.aclweb.org/anthology/2020.acl-main.577.pdf)* | [Flair English 18-class NER demo](https://huggingface.co/flair/ner-english-ontonotes-large) |
35+
| German | Conll-03 (4-class) | **92,31** | *90.3 [(Yu et al., 2016)](https://www.aclweb.org/anthology/2020.acl-main.577.pdf)* | [Flair German 4-class NER demo](https://huggingface.co/flair/ner-german-large) |
36+
| Dutch | Conll-03 (4-class) | **95,25** | *93.7 [(Yu et al., 2016)](https://www.aclweb.org/anthology/2020.acl-main.577.pdf)* | [Flair Dutch 4-class NER demo](https://huggingface.co/flair/ner-dutch-large) |
37+
| Spanish | Conll-03 (4-class) | **90,54** | *90.3 [(Yu et al., 2016)](https://www.aclweb.org/anthology/2020.acl-main.577.pdf)* | [Flair Spanish 18-class NER demo](https://huggingface.co/flair/ner-spanish-large) |
5238

53-
* *[Pooled Contextualized Embeddings for Named Entity Recognition](https://www.aclweb.org/anthology/papers/N/N19/N19-1078/).
54-
Alan Akbik, Tanja Bergmann and Roland Vollgraf.
55-
2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics, **NAACL 2019**.*
39+
**New:** Most Flair sequence tagging models (named entity recognition, part-of-speech tagging etc.) are now hosted
40+
on the [__🤗 HuggingFace model hub__](https://huggingface.co/models?filter=flair)! You can browse models, check detailed information on how they were trained, and even try each model out online!
5641

57-
* *[FLAIR: An Easy-to-Use Framework for State-of-the-Art NLP](https://www.aclweb.org/anthology/papers/N/N19/N19-4010/).
58-
Alan Akbik, Tanja Bergmann, Duncan Blythe, Kashif Rasul, Stefan Schweter and Roland Vollgraf.
59-
2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), **NAACL 2019**.*
6042

6143
## Quick Start
6244

6345
### Requirements and Installation
6446

65-
The project is based on PyTorch 1.1+ and Python 3.6+, because method signatures and type hints are beautiful.
47+
The project is based on PyTorch 1.5+ and Python 3.6+, because method signatures and type hints are beautiful.
6648
If you do not have Python 3.6, install it first. [Here is how for Ubuntu 16.04](https://vsupalov.com/developing-with-python3-6-on-ubuntu-16-04/).
6749
Then, in your favorite virtual environment, simply do:
6850

@@ -144,7 +126,7 @@ There are also good third-party articles and posts that illustrate how to use Fl
144126

145127
## Citing Flair
146128

147-
Please cite the following paper when using Flair:
129+
Please cite [the following paper](https://www.aclweb.org/anthology/C18-1139/) when using Flair embeddings:
148130

149131
```
150132
@inproceedings{akbik2018coling,
@@ -156,7 +138,19 @@ Please cite the following paper when using Flair:
156138
}
157139
```
158140

159-
If you use the pooled version of the Flair embeddings (PooledFlairEmbeddings), please cite:
141+
If you use the Flair framework for your experiments, please cite [this paper](https://www.aclweb.org/anthology/papers/N/N19/N19-4010/):
142+
143+
```
144+
@inproceedings{akbik2019flair,
145+
title={FLAIR: An easy-to-use framework for state-of-the-art NLP},
146+
author={Akbik, Alan and Bergmann, Tanja and Blythe, Duncan and Rasul, Kashif and Schweter, Stefan and Vollgraf, Roland},
147+
booktitle={{NAACL} 2019, 2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations)},
148+
pages={54--59},
149+
year={2019}
150+
}
151+
```
152+
153+
If you use the pooled version of the Flair embeddings (PooledFlairEmbeddings), please cite [this paper](https://www.aclweb.org/anthology/papers/N/N19/N19-1078/):
160154

161155
```
162156
@inproceedings{akbik2019naacl,
@@ -168,6 +162,18 @@ If you use the pooled version of the Flair embeddings (PooledFlairEmbeddings), p
168162
}
169163
```
170164

165+
If you use our new "FLERT" models or approach, please cite [this paper](https://arxiv.org/abs/2011.06993):
166+
167+
```
168+
@misc{schweter2020flert,
169+
title={FLERT: Document-Level Features for Named Entity Recognition},
170+
author={Stefan Schweter and Alan Akbik},
171+
year={2020},
172+
eprint={2011.06993},
173+
archivePrefix={arXiv},
174+
primaryClass={cs.CL}
175+
```
176+
171177
## Contact
172178

173179
Please email your questions or comments to [Alan Akbik](http://alanakbik.github.io/).

flair/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
import logging.config
2727

28-
__version__ = "0.7"
28+
__version__ = "0.8"
2929

3030
logging.config.dictConfig(
3131
{

flair/datasets/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from .sequence_labeling import ANER_CORP
1111
from .sequence_labeling import BIOFID
1212
from .sequence_labeling import BIOSCOPE
13+
from .sequence_labeling import BUSINESS_HUN
1314
from .sequence_labeling import CONLL_03
1415
from .sequence_labeling import CONLL_03_GERMAN
1516
from .sequence_labeling import CONLL_03_DUTCH
@@ -55,14 +56,16 @@
5556
from .sequence_labeling import WSD_UFSAC
5657
from .sequence_labeling import WNUT_2020_NER
5758
from .sequence_labeling import XTREME
58-
from .sequence_labeling import BUSINESS_HUN
5959

6060
# Expose all document classification datasets
6161
from .document_classification import ClassificationCorpus
6262
from .document_classification import ClassificationDataset
6363
from .document_classification import CSVClassificationCorpus
6464
from .document_classification import CSVClassificationDataset
6565
from .document_classification import AMAZON_REVIEWS
66+
from .document_classification import COMMUNICATIVE_FUNCTIONS
67+
from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE
68+
from .document_classification import GO_EMOTIONS
6669
from .document_classification import IMDB
6770
from .document_classification import NEWSGROUPS
6871
from .document_classification import SENTIMENT_140
@@ -74,13 +77,10 @@
7477
from .document_classification import SENTEVAL_SST_GRANULAR
7578
from .document_classification import TREC_50
7679
from .document_classification import TREC_6
77-
from .document_classification import COMMUNICATIVE_FUNCTIONS
7880
from .document_classification import WASSA_ANGER
7981
from .document_classification import WASSA_FEAR
8082
from .document_classification import WASSA_JOY
8183
from .document_classification import WASSA_SADNESS
82-
from .document_classification import GO_EMOTIONS
83-
from .document_classification import GERMEVAL_2018_OFFENSIVE_LANGUAGE
8484

8585
# Expose all treebanks
8686
from .treebanks import UniversalDependenciesCorpus

0 commit comments

Comments
 (0)