mayabot / fastText4j

Implementing Facebook's FastText with java
160 stars 23 forks source link

load 官方python版bin classifier 报错 #16

Open xikunlun001 opened 5 years ago

xikunlun001 commented 5 years ago

想请问下是否可以load 用facebook官方python接口训练出的bin classifier 我直接load 会报错: Exception in thread "main" java.lang.RuntimeException: Model file has wrong file format! at com.mayabot.mynlp.fasttext.LoadFastTextFromClangModel.loadCModel(LoadFastTextFromClangModel.kt:32) at com.mayabot.mynlp.fasttext.LoadFastTextFromClangModel.loadCModel(LoadFastTextFromClangModel.kt:124) at com.mayabot.mynlp.fasttext.FastText$Companion.loadFasttextBinModel(FastText.kt:366) at com.mayabot.mynlp.fasttext.FastText.loadFasttextBinModel(FastText.kt)

jimichan commented 4 years ago
<dependency>
  <groupId>com.mayabot.mynlp</groupId>
  <artifactId>fastText4j</artifactId>
  <version>3.1.0</version>
</dependency>

这个版本兼容最新的bin文件格式,你可以试试

ares89 commented 4 years ago

使用了3.1.2依然报错哦

jimichan commented 4 years ago

fix in 3.1.6     ------------------ Original ------------------ From:  "ares89"<notifications@github.com>; Date:  Mon, May 25, 2020 04:39 PM To:  "mayabot/fastText4j"<fastText4j@noreply.github.com>; Cc:  "jimi"<jimichan@mayabot.com>; "Comment"<comment@noreply.github.com>; Subject:  Re: [mayabot/fastText4j] load 官方python版bin classifier 报错 (#16)

 

使用了3.1.2依然报错哦

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.