Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fast version of German NER models #211

Closed
sscdotopen opened this issue Nov 15, 2018 · 5 comments
Closed

Fast version of German NER models #211

sscdotopen opened this issue Nov 15, 2018 · 5 comments
Labels
enhancement Improving of an existing feature sequence tagger Related to sequence tagger

Comments

@sscdotopen
Copy link

Hi,

Is there a chance that you could provide a fast version of the German NER model, similar to ner-fast for english?

@alanakbik
Copy link
Collaborator

Good idea - we'll add some faster models for German as well.

@alanakbik alanakbik added enhancement Improving of an existing feature sequence tagger Related to sequence tagger labels Nov 15, 2018
@alanakbik
Copy link
Collaborator

Hi @sscdotopen - we just released flair 0.4.0 - it includes new 'one model, many languages' NER taggers. I.e. this is a single model that can consume text in English, German, Dutch and Spanish and predict NER tags. (Also kind of works for other languages such as French.)

Use like this:

# load model
tagger = SequenceTagger.load('ner-multi')

# text with English and German sentences
sentence = Sentence('George Washington went to Washington . Dort traf er Thomas Jefferson .')

# predict NER tags
tagger.predict(sentence)

# print sentence with predicted tags
for entity in sentence.get_spans('ner'):
    print(entity)

We also include a 'fast' version for CPU inference, and a 'fast-learning' version with new, experimental continuous learning (a bit better than 'fast' and theoretically should keep improving as you use it more).

# fast multilingual NER model
tagger = SequenceTagger.load('ner-multi-fast')

# fast multilingual NER model with continuous learning
tagger = SequenceTagger.load('ner-multi-fast-learn')

We'd be happy to hear how they work for you!

@timnon
Copy link
Contributor

timnon commented Apr 8, 2019

Thanks for this awesome package! I noticed that ner-multi has problems with the following constellation: "Hans Meier ist ein fleissiger Mensch. Er arbeitet bei der Firma ABCDE.". "ABCDE" is not recognized as an organisation or anything else. Other letter combinations are recognized, sometimes as locations. The organisation recognition works if i use "Hans Meier arbeitet bei der Firma ABCDE".

@alanakbik
Copy link
Collaborator

Hi @timnon thanks for sharing this example - we'll take a look!

@Benvorth
Copy link

Benvorth commented Sep 8, 2024

Hey, is there a more recent version of ner-multi-fast? I was not able to make it run with recent libs like torch==2.2.1 and flair==0.14.0...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving of an existing feature sequence tagger Related to sequence tagger
Projects
None yet
Development

No branches or pull requests

4 participants