Agriculture_KnowledgeGraph icon indicating copy to clipboard operation
Agriculture_KnowledgeGraph copied to clipboard

pyfasttext==0.4.5

Open trash-lin opened this issue 3 years ago • 3 comments

想问一下pyfasttext==0.4.5怎么pip,我老是报错,requirement.txt里面的

trash-lin avatar Sep 14 '21 06:09 trash-lin

我也是

sainthyz avatar Sep 14 '22 07:09 sainthyz

me too ,anybody can solve it?

Gaia0o0 avatar Mar 11 '24 03:03 Gaia0o0

I had try anyways of solving , but I found the easy way to solve the problem

  1. do not try to install pyfasttext , just install fasttext . that's OK
  2. change the from pyfasttext import Fasttext to from fasttext import Fasttext
  3. change the code , just like this model = FastText.load_model('wiki.zh.bin') print(model.get_nearest_neighbors('桃', k=5))

Gaia0o0 avatar Mar 12 '24 02:03 Gaia0o0