flair / ner-german

huggingface.co
Total runs: 3.4K
24-hour runs: 0
7-day runs: 92
30-day runs: -89
Model's Last Updated: Abril 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

3.4K
Total runs
0
24-hour runs
-51
3-day runs
92
7-day runs
-89
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: 186.7K
Run Growth: 26.7K
Growth Rate: 14.24%
Updated:Julho 22 2024
huggingface.co

Total runs: 23.6K
Run Growth: -3.6K
Growth Rate: -15.30%
Updated:Abril 10 2023
huggingface.co

Total runs: 14.5K
Run Growth: 457
Growth Rate: 3.16%
Updated:Agosto 13 2025
huggingface.co

Total runs: 7.9K
Run Growth: -27.0K
Growth Rate: -269.12%
Updated:Março 03 2021
huggingface.co

Total runs: 6.1K
Run Growth: -1.6K
Growth Rate: -27.03%
Updated:Março 13 2025
huggingface.co

Total runs: 1.2K
Run Growth: 760
Growth Rate: 65.92%
Updated:Março 13 2025
huggingface.co

Total runs: 527
Run Growth: -3.2K
Growth Rate: -610.63%
Updated:Dezembro 06 2024
huggingface.co

Total runs: 399
Run Growth: 140
Growth Rate: 35.71%
Updated:Abril 07 2023
huggingface.co

Total runs: 252
Run Growth: -503
Growth Rate: -199.60%
Updated:Abril 05 2023
huggingface.co

Total runs: 115
Run Growth: 33
Growth Rate: 30.56%
Updated:Julho 22 2024
huggingface.co

Total runs: 54
Run Growth: -168
Growth Rate: -300.00%
Updated:Março 03 2021
huggingface.co

Total runs: 38
Run Growth: 12
Growth Rate: 31.58%
Updated:Outubro 04 2022
huggingface.co

Total runs: 11
Run Growth: -12
Growth Rate: -109.09%
Updated:Fevereiro 26 2021