Repository navigation
Refactor + update BaseEmbedder emebedding methods - #855
Conversation
|
Thank you for the PR and apologies for the late reply. I'll take some time to look things over. |
|
Other than the things mentioned above, there are some real nice refactors there! |
Thanks! Let me know if you would like me to change anything |
Yes, the things I mentioned above would be great if you could update them. |
Sorry, not sure I see any comments. Where did you write them? 😅 |
Oops, my bad! You should see them now. |
|
@zachschillaci27 Thanks for the work! I just merged it 😄 |
Refactor and update the various
BaseEmbeddersubclasses, specifically focusing on theembedmethods. The changes are summarized for each subclass below:FlairBackend: Replace unusedindexwith_GensimBackend: Change handling of out-of-vocabulary words from assigning the zero vector to skipping. Directly compute the mean over word vectors using a list comprehension.SentenceTransformerBackend: Directly returnembeddings.SpacyBackend: Avoid bareexcept(risky) and change handling of empty documents. Though I'm not certain the empty document checks are necessary - what were the original exceptions being raised?USEBackend: Directly returnembeddings.Please let me know if you have any comments or feedback!