当我使用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
答案 0 :(得分:1)
发生错误是因为您尚未加载模型。
您可以了解如何加载经过培训的模型here。在那里,您还可以查看如何train supervised models或unsupervised models。
函数loadModel()
适用于所有这些模型。