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

Tag name map #1988

Merged
merged 7 commits into from
Dec 1, 2020
Merged

Tag name map #1988

merged 7 commits into from
Dec 1, 2020

Conversation

pharnisch
Copy link
Contributor

@pharnisch pharnisch commented Nov 25, 2020

#1985

Test:
corpus = EUROPARL_NER_GERMAN(label_name_map={'LOC': 'location test a-b-c', 'PPER': 'person test a-b-c'})
print(corpus.test[83])

Output:
Sentence: "In Wien gab es eine große Konferenz ." [− Tokens: 8 − Token-Labels: "In <in/APPR/I-PC> Wien <Wien/NE/I-PC/S-location test a b c> gab <geben/VVFIN/I-VC> es <es/person test a b c/I-NC> eine <ein/ART/B-NC> große <groß/ADJA/I-NC> Konferenz <Konferenz/NN/I-NC> . <./$.>"]

As you can see, my implementation replaces "-" with " " because e.g. the methods iob2 and iob_iobes in data.py run into problems when tags contain "-".

@alanakbik
Copy link
Collaborator

@pharnisch thanks for adding this!

@alanakbik alanakbik merged commit 774366a into flairNLP:master Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants