Migration 3 to 4

11 views
Skip to first unread message

이팩터s

unread,
Jun 12, 2024, 2:50:07 PMJun 12
to Gensim
I use "from gensim.models.base_any2vec import BaseWordEmbeddingsModel"
What is this in 4?

Gordon Mohr

unread,
Jun 12, 2024, 2:59:18 PMJun 12
to Gensim
I'd need more context on how you're using this (essentially abstract) superclassm to make any confident recommednations.

Are you creating your own customized subclass? If so, and you're making your own overrides/superclass-invocations, your porting may be tougher than the usual simple recipes. 

In any case, you may just want to pick whichever of the concrete word2vec-related classes is closest to your need - potentially, just `gensim.models.word2vec.Word2Vec` itself. Trying that, then correcting any further usages/errors along the lines of the recommendations in the migration guide (https://github.com/piskvorky/gensim/wiki/Migrating-from-Gensim-3.x-to-4) might do all or most of what you need. 

- Gordon

Reply all
Reply to author
Forward
0 new messages