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

#1456: Add Malayalam flair embeddings models #1458

Merged
merged 2 commits into from
Mar 8, 2020

Conversation

aiswaryas-qb
Copy link
Contributor

To load use 'ml-forward' (Forward Model) and 'ml-backward' (Backward Model).

…-forward' (Forward Model) and 'ml-backward' (Backward Model).
@alanakbik
Copy link
Collaborator

@aiswaryas-qb thanks and please excuse the delay in responding! Could you remove the whitespace in the download URL for the backward model as indicated in the comment? Then everything works:

# example sentence
sentence = Sentence('ഈ പർവത പാത മനോഹരമായ തടാകത്തിനടുത്തേക്ക് കയറിച്ചെല്ലുന്നു')

# init Malayalam embeddings
embeddings = StackedEmbeddings(
    [FlairEmbeddings('ml-forward'),
     FlairEmbeddings('ml-backward')]
)

# embed sentence
embeddings.embed(sentence)

# check embeddings
for token in sentence:
    print(token)
    print(token.embedding[:10])

@aiswaryas-qb
Copy link
Contributor Author

Hi @alanakbik I have removed the backspace and have updated embeddings.py file. Thank you.

@alanakbik
Copy link
Collaborator

Great, thanks for adding this!

@alanakbik alanakbik merged commit 66412b5 into flairNLP:master Mar 8, 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