確實我想在java類中使用babelNet api 2.5但我得到這個錯誤,我不知道原因。在BabelNet 2.5配置中的錯誤
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/C:/Users/khalifa/Downloads/apache-jena-2.12.1/apache-jena-2.12.1/lib/slf4j-log4j12-1.7.6.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/D:/Bureau%20080614/bureau31122014/BabelNet/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
[ INFO ] BabelNetConfiguration - Loading babelnet.properties FROM C:\Users\khalifa\Documents\NetBeansProjects\Test2\config\babelnet.properties
[ INFO ] BabelNet - BabelNet API v2.5 written by Roberto Navigli, Simone Ponzetto and Daniele Vannella, with additional contributions by Francesco Cecconi
[ INFO ] BabelNet - ---------------
[ INFO ] BabelNet - Opening dict index: D:/Bureau 080614/bureau31122014/BabelNet/dict
[ INFO ] BabelNet - Opening gloss index: D:/Bureau 080614/bureau31122014/BabelNet/gloss
java.lang.RuntimeException: Could not init BabelNet: read past EOF
at it.uniroma1.lcl.babelnet.BabelNet.getInstance(BabelNet.java:217)
[ INFO ] BabelNet - Opening lexicon index: D:/Bureau 080614/bureau31122014/BabelNet/dict
at Dijkestra.ContextDefinition.getDefinition(ContextDefinition.java:111)
at Dijkestra.ContextDefinition.main(ContextDefinition.java:145)
當我用BabelNet的代碼是在這裏:
import it.uniroma1.lcl.babelnet.BabelNet;
import java.util.LinkedList;
import java.util.List;
public class ContextDefinition {
public static void getDefinition(String v){
try{
BabelNet bn = BabelNet.getInstance();
}catch (Exception e){
e.printStackTrace();
}
}
public static void main(String[] args)
{
getDefinition("bbank");
}
}
我會很感激,如果有人能幫我解決這個問題。