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

GH-1190 Fix OneHotEmbeddings #1191

Merged
merged 1 commit into from
Oct 8, 2019

Conversation

apohllo
Copy link
Contributor

@apohllo apohllo commented Oct 7, 2019

Fixes #1190

@alanakbik
Copy link
Collaborator

@apohllo thanks for fixing this!

Can I ask how you are using this feature, i.e. is there a task for which it is important to embed something other than text?

@apohllo
Copy link
Contributor Author

apohllo commented Oct 7, 2019

Yes, for instance we embed POS tags and for Polish it gives several p.p. improvement for sequence tagging task.

@alanakbik
Copy link
Collaborator

👍

@djstrong
Copy link
Contributor

djstrong commented Oct 8, 2019

In the training a model tutorial (https://github.com/zalandoresearch/flair/blob/master/resources/docs/TUTORIAL_7_TRAINING_A_MODEL.md) we can append POS tags:

embedding_types: List[TokenEmbeddings] = [
    WordEmbeddings('glove'),
    OneHotEmbeddings(corpus=corpus, field='pos'),
]

Copy link
Contributor

@djstrong djstrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works.

@yosipk
Copy link
Collaborator

yosipk commented Oct 8, 2019

👍

@yosipk yosipk merged commit 97c5f66 into flairNLP:master Oct 8, 2019
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.

OneHotEmbeddings has error in implementation
4 participants