flair / ner-german

huggingface.co
Total runs: 7.0K
24-hour runs: 0
7-day runs: -935
30-day runs: -1.8K
Model's Last Updated: April 05 2023
token-classification

Introduction of ner-german

Model Details of ner-german

German NER in Flair (default model)

This is the standard 4-class NER model for German that ships with Flair .

F1-Score: 87,94 (CoNLL-03 German revised)

Predicts 4 tags:

tag meaning
PER person name
LOC location name
ORG organization name
MISC other name

Based on Flair embeddings and LSTM-CRF.


Demo: How to use in Flair

Requires: Flair ( pip install flair )

from flair.data import Sentence
from flair.models import SequenceTagger

# load tagger
tagger = SequenceTagger.load("flair/ner-german")

# make example sentence
sentence = Sentence("George Washington ging nach Washington")

# predict NER tags
tagger.predict(sentence)

# print sentence
print(sentence)

# print predicted NER spans
print('The following NER tags are found:')
# iterate over entities and print
for entity in sentence.get_spans('ner'):
    print(entity)

This yields the following output:

Span [1,2]: "George Washington"   [− Labels: PER (0.9977)]
Span [5]: "Washington"   [− Labels: LOC (0.9895)]

So, the entities " George Washington " (labeled as a person ) and " Washington " (labeled as a location ) are found in the sentence " George Washington ging nach Washington ".


Training: Script to train this model

The following Flair script was used to train this model:

from flair.data import Corpus
from flair.datasets import CONLL_03_GERMAN
from flair.embeddings import WordEmbeddings, StackedEmbeddings, FlairEmbeddings

# 1. get the corpus
corpus: Corpus = CONLL_03_GERMAN()

# 2. what tag do we want to predict?
tag_type = 'ner'

# 3. make the tag dictionary from the corpus
tag_dictionary = corpus.make_tag_dictionary(tag_type=tag_type)

# 4. initialize each embedding we use
embedding_types = [

    # GloVe embeddings
    WordEmbeddings('de'),

    # contextual string embeddings, forward
    FlairEmbeddings('de-forward'),

    # contextual string embeddings, backward
    FlairEmbeddings('de-backward'),
]

# embedding stack consists of Flair and GloVe embeddings
embeddings = StackedEmbeddings(embeddings=embedding_types)

# 5. initialize sequence tagger
from flair.models import SequenceTagger

tagger = SequenceTagger(hidden_size=256,
                        embeddings=embeddings,
                        tag_dictionary=tag_dictionary,
                        tag_type=tag_type)

# 6. initialize trainer
from flair.trainers import ModelTrainer

trainer = ModelTrainer(tagger, corpus)

# 7. run training
trainer.train('resources/taggers/ner-german',
              train_with_dev=True,
              max_epochs=150)

Cite

Please cite the following paper when using this model.

@inproceedings{akbik2018coling,
  title={Contextual String Embeddings for Sequence Labeling},
  author={Akbik, Alan and Blythe, Duncan and Vollgraf, Roland},
  booktitle = {{COLING} 2018, 27th International Conference on Computational Linguistics},
  pages     = {1638--1649},
  year      = {2018}
}

Issues?

The Flair issue tracker is available here .

Runs of flair ner-german on huggingface.co

7.0K
Total runs
0
24-hour runs
-142
3-day runs
-935
7-day runs
-1.8K
30-day runs

More Information About ner-german huggingface.co Model

ner-german huggingface.co

ner-german huggingface.co is an AI model on huggingface.co that provides ner-german's model effect (), which can be used instantly with this flair ner-german model. huggingface.co supports a free trial of the ner-german model, and also provides paid use of the ner-german. Support call ner-german model through api, including Node.js, Python, http.

ner-german huggingface.co Url

https://huggingface.co/flair/ner-german

flair ner-german online free

ner-german huggingface.co is an online trial and call api platform, which integrates ner-german's modeling effects, including api services, and provides a free online trial of ner-german, you can try ner-german online for free by clicking the link below.

flair ner-german online free url in huggingface.co:

https://huggingface.co/flair/ner-german

ner-german install

ner-german is an open source model from GitHub that offers a free installation service, and any user can find ner-german on GitHub to install. At the same time, huggingface.co provides the effect of ner-german install, users can directly use ner-german installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

ner-german install url in huggingface.co:

https://huggingface.co/flair/ner-german

Url of ner-german

ner-german huggingface.co Url

Provider of ner-german huggingface.co

flair
ORGANIZATIONS

Other API from flair

huggingface.co

Total runs: 191.5K
Run Growth: -23.6K
Growth Rate: -12.34%
Updated:August 28 2022
huggingface.co

Total runs: 176.2K
Run Growth: -77.8K
Growth Rate: -44.14%
Updated:July 22 2024
huggingface.co

Total runs: 34.0K
Run Growth: 29.2K
Growth Rate: 85.76%
Updated:March 13 2025
huggingface.co

Total runs: 27.8K
Run Growth: -460
Growth Rate: -1.66%
Updated:April 10 2023
huggingface.co

Total runs: 19.9K
Run Growth: 9.9K
Growth Rate: 49.84%
Updated:August 13 2025
huggingface.co

Total runs: 1.7K
Run Growth: 1.5K
Growth Rate: 79.81%
Updated:December 06 2024
huggingface.co

Total runs: 460
Run Growth: 200
Growth Rate: 43.48%
Updated:March 13 2025
huggingface.co

Total runs: 416
Run Growth: -371
Growth Rate: -86.68%
Updated:April 05 2023
huggingface.co

Total runs: 285
Run Growth: -79
Growth Rate: -29.37%
Updated:March 03 2021
huggingface.co

Total runs: 273
Run Growth: -327
Growth Rate: -120.22%
Updated:April 07 2023
huggingface.co

Total runs: 59
Run Growth: -880
Growth Rate: -1491.53%
Updated:October 04 2022
huggingface.co

Total runs: 24
Run Growth: -364
Growth Rate: -1516.67%
Updated:July 22 2024
huggingface.co

Total runs: 3
Run Growth: -22
Growth Rate: -733.33%
Updated:February 26 2021