0

当我使用 fasttext 在 java 中使用 Jfasttext 库获取单词的向量时出现错误。错误是

     A fatal error has been detected by the Java Runtime Environment:

#  SIGSEGV (0xb) at pc=0x00007f412c606444, pid=14379, tid=139916342187776
#
# JRE version: OpenJDK Runtime Environment (7.0_121) (build 1.7.0_121-b00)
# Java VM: OpenJDK 64-Bit Server VM (24.121-b00 mixed mode linux-amd64 compressed oops)
# Derivative: IcedTea 2.6.8
# Distribution: Ubuntu 14.04 LTS, package 7u121-2.6.8-1ubuntu0.14.04.3
# Problematic frame:
# C  [libjniFastTextWrapper.so+0x1e444]  
FastTextWrapper::FastTextApi::getVector(std::string const&)+0x24
#
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
#
# An error report file with more 
4

1 回答 1

0

发生错误是因为您尚未加载模型。

您可以在此处了解如何加载经过训练的模型。在那里您还可以了解如何训练有监督模型无监督模型

该功能loadModel()适用​​于所有这些模型。

于 2017-05-14T21:36:28.517 回答