我正在尝试建立一个定制词典。我正在测试jwnl。我收到以下错误:
JSON.stringify(OBJ1) === JSON.stringify(OBJ2)
我的xml文件 -
net.didion.jwnl.JWNLException: Unable to install
net.didion.jwnl.dictionary.FileBackedDictionary
我有以下Java代码 -
<?xml version="1.0" encoding="UTF-8"?>
<jwnl_properties language="en">
<version publisher="Princeton" number="2.0" language="en"/>
<dictionary class="net.didion.jwnl.dictionary.FileBackedDictionary">
<param name="morphological_processor" value="net.didion.jwnl.dictionary.morph.DefaultMorphologicalProcessor">
<param name="operations">
<param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
<param value="net.didion.jwnl.dictionary.morph.DetachSuffixesOperation">
<param name="noun" value="|s=|ses=s|xes=x|zes=z|ches=ch|shes=sh|men=man|ies=y|"/>
<param name="verb" value="|s=|ies=y|es=e|es=|ed=e|ed=|ing=e|ing=|"/>
<param name="adjective" value="|er=|est=|er=e|est=e|"/>
<param name="operations">
<param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
<param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
</param>
</param>
<param value="net.didion.jwnl.dictionary.morph.TokenizerOperation">
<param name="delimiters">
<param value=" "/>
<param value="-"/>
</param>
<param name="token_operations">
<param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
<param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
<param value="net.didion.jwnl.dictionary.morph.DetachSuffixesOperation">
<param name="noun" value="|s=|ses=s|xes=x|zes=z|ches=ch|shes=sh|men=man|ies=y|"/>
<param name="verb" value="|s=|ies=y|es=e|es=|ed=e|ed=|ing=e|ing=|"/>
<param name="adjective" value="|er=|est=|er=e|est=e|"/>
<param name="operations">
<param value="net.didion.jwnl.dictionary.morph.LookupIndexWordOperation"/>
<param value="net.didion.jwnl.dictionary.morph.LookupExceptionsOperation"/>
</param>
</param>
</param>
</param>
</param>
</param>
<param name="dictionary_element_factory" value="net.didion.jwnl.princeton.data.PrincetonWN17FileDictionaryElementFactory"/>
<param name="file_manager" value="net.didion.jwnl.dictionary.file_manager.FileManagerImpl">
<param name="file_type" value="net.didion.jwnl.princeton.file.PrincetonRandomAccessDictionaryFile"/>
<param name="dictionary_path" value="/"/>
</param>
</dictionary>
<resource class="PrincetonResource"/>
我在Ubuntu下使用Java 1.7并使用Eclipse进行测试。 我假设错误是在dictionary_path但我找不到任何有效的。我没有手动下载wordnet数据库 - 我不确定它位于何处。有没有人有任何想法来解决这个问题?
答案 0 :(得分:0)
我找到答案是安装mysql但我没有测试过,因为我的系统使用mongo db。