Repository: flairNLP/flair

Issue:
Dutch language support
Hi,

I trained (another) language model for Dutch (using Wikipedia, Europarl and OpenSubtitles). Training corpus size was 4.9G (897,298,291 token). Perplexity was around ~2.7 for both forward and backward language model.

Using the Dutch `fasttext` embeddings and the trained language models, an accuracy of 93.84 could be achieved on Universal Dependencies (v1.2). E.g. [this paper](https://arxiv.org/abs/1711.04903) reported an accuracy of 93.09 using adversarial training, the bi-lstm paper from [Plank et. al](https://arxiv.org/pdf/1604.05529.pdf) achieved an accuracy of 93.82.

Then I trained a model on the CoNLL 2002 dataset for NER. I was able to achieve a f-score of 87.96 (the best reported system on CoNLL 2002 achieved 77.05) -> I haven't done any research for current SOTA on that dataset yet.

Feel free to integrate the language models in `flair` :) They can be downloaded via:

```bash
wget https://schweter.eu/cloud/flair-lms/lm-nl-large-forward-v0.1.pt
wget https://schweter.eu/cloud/flair-lms/lm-nl-large-backward-v0.1.pt
```

More details on training parameters:

* [UD Dutch](https://github.com/stefan-it/flair-experiments/blob/master/ud-dutch/README.md)
* [NER Dutch](https://github.com/stefan-it/flair-experiments/blob/master/conll2002-ner-dutch/README.md)
* [Language models Dutch](https://github.com/stefan-it/flair-lms#dutch)


Discussion:
Hey this is great, congrats on the new SotA :) Can we package your language models with the next release? Also, will you make the NER model available?
Sure, it would be great if the language models could be integrated in `flair` directly.

I retrained the model with the latest `master` version of `flair`. F-score is now 89.56:

```python
from flair.data import Sentence
from flair.models import SequenceTagger
tagger = SequenceTagger.load_from_file('nl-ner-conll02-v0.1.pt')
sentence: Sentence = Sentence('Uefa en Fifa doen concessie inzake transfers .')
tagger.predict(sentence)
```

Outputs: `Uefa <S-ORG> en Fifa <S-ORG> doen concessie inzake transfers .`

I also uploaded the ner model; feel free to also integrate it in `flair` - it can be downloaded via:

```bash
wget https://schweter.eu/cloud/flair-models/nl-ner-conll02-v0.1.pt
```

Resolving patch:
diff --git a/flair/models/sequence_tagger_model.py b/flair/models/sequence_tagger_model.py
--- a/flair/models/sequence_tagger_model.py
+++ b/flair/models/sequence_tagger_model.py
@@ -560,6 +560,7 @@ def _filter_empty_sentences(sentences: List[Sentence]) -> List[Sentence]:
     def load(model: str):
         model_file = None
         aws_resource_path = 'https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/models-v0.2'
+        aws_resource_path_v04 = 'https://s3.eu-central-1.amazonaws.com/alan-nlp/resources/models-v0.4'
         cache_dir = Path('models')
 
         if model.lower() == 'ner':
@@ -644,6 +645,10 @@ def load(model: str):
             base_path = '/'.join([aws_resource_path, 'NER-aij-wikiner-fr-wp3', 'fr-ner.pt'])
             model_file = cached_path(base_path, cache_dir=cache_dir)
 
+        elif model.lower() == 'nl-ner':
+            base_path = '/'.join([aws_resource_path_v04, 'NER-conll2002-dutch', 'nl-ner-conll02-v0.1.pt'])
+            model_file = cached_path(base_path, cache_dir=cache_dir)
+
         if model_file is not None:
             tagger: SequenceTagger = SequenceTagger.load_from_file(model_file)
             return tagger


Test patch: