HIT-SCIR / ELMoForManyLangs

Pre-trained ELMo Representations for Many Languages
MIT License
1.46k stars 244 forks source link

Installable pip package #46

Open mauryaland opened 5 years ago

mauryaland commented 5 years ago

Hello,

Thank you for these great embeddings, really nice to have the possibility to use them, especially the french one in my case.

I wonder if you are planning to create an installable pip package or if you want someone, possibly me, trying to?

This could be very useful in order to use those embeddings in other libraries such as Flair.

Thank you in advance for your answer.

Amaury

Oneplus commented 5 years ago

Hi @mauryaland,

Thank you for your interest! Making it pip installable is a good idea. However, the current project is very unstable and experimental. And we do not have enough time to officially release it. Currently, you can use the Embedder class for programmatically interface.

I will leave this issue open until we have a detailed plan.

AngledLuffa commented 4 years ago

Rather than open a new issue, can I ask in this thread: any further progress on this? Any possibility of having this module on pip?

Thanks!

akutuzov commented 4 years ago

@AngledLuffa you can try the simple-elmo project. It relies on TensorFlow, not PyTorch, but the idea is the same: to make ELMo usage more straightforward.

AngledLuffa commented 4 years ago

Thank you for the suggestion! Does that work on the models hosted on allennlp and the models hosted here? Or just one subset of those models? It's a little unclear from that documentation what models to use or where to get them. Otherwise, it looks quite promising.

akutuzov commented 4 years ago

With simple-elmo, you can load:

  1. Pre-trained models provided by allennlp. You'll just have to rename their files to model.hdf5 and options.json, and create a vocab.txt file with any number of words in it (at least try to include<S> and </S>).
  2. All the ELMo models from the NLPL vector repository, except those provided by ELMOForManyLangs.

We are currently thinking about ways to automatically convert and load ELMOForManyLangs models.