以文本方式查看主题

-  W3CHINA.ORG讨论区 - 语义网·描述逻辑·本体·RDF·OWL  (http://bbs.xml.org.cn/index.asp)
--  『 Semantic Web(语义Web)/描述逻辑/本体 』  (http://bbs.xml.org.cn/list.asp?boardid=2)
----  好久不见的text2onto配置问题  (http://bbs.xml.org.cn/dispbbs.asp?boardid=2&rootid=&id=72255)


--  作者:monicashu
--  发布时间:2/24/2009 2:47:00 PM

--  好久不见的text2onto配置问题
我用的是text2onto-210207-noinstaller版本
按里面的readme进行配置

text2onto.properties里面的参数跟readme写的不太一样,我完全按readme走的:
language=english
gate_dir=F:/Studio/Week/Martedi/Text2Onto/text2onto-210207-noinstaller/3rdparty/gate/
gate_app=application.gate
jape_main=main.jape
stop_file=stopwords.txt
creole_dir=F:/Studio/Week/Martedi/Text2Onto/text2onto-210207-noinstaller/3rdparty/gate/
jwnl_properties=F:/Studio/Week/Martedi/Text2Onto/text2onto-210207-noinstaller/3rdparty/jwnl/file_properties.xml
temp_corpus=C:/temp/text2onto/
algorithms=F:/Studio/Week/Martedi/Text2Onto/text2onto-210207-noinstaller/algorithms.xml
icons=F:/Studio/Week/Martedi/Text2Onto/text2onto-210207-noinstaller/icons/

3rdparty/jwnl/file_properties.xml改了
<param name="dictionary_path" value="F:\Studio\Week\Martedi\Text2Onto\WordNet\2.1\dict"/>

Text2onto.bat
@echo off
set T2O=F:\Studio\Week\Martedi\Text2Onto\text2onto-210207-noinstaller
set LIB=%T2O%\3rdparty
set GATE=F:\Studio\Week\Martedi\Text2Onto\gate-4.0-build2752-ALL

Start text2onto.bat. 出现问题:
loading settings from file F:\Studio\Week\Martedi\Text2Onto\text2onto-210207-noi
nstaller/text2onto.properties

Preprocessor.init
Using F:\Studio\Week\Martedi\Text2Onto\gate-4.0-build2752-ALL as GATE home
Using F:\Studio\Week\Martedi\Text2Onto\gate-4.0-build2752-ALL\plugins as install
ed plug-ins directory.
Using F:\Studio\Week\Martedi\Text2Onto\gate-4.0-build2752-ALL\gate.xml as site c
onfiguration file.
Using C:\Documents and Settings\Monica\gate.xml as user configuration file
CREOLE plugin loaded: file:/F:/Studio/Week/Martedi/Text2Onto/gate-4.0-build2752-
ALL/plugins/ANNIE/

LinguisticPreprocessor.init: file:f://studio/week/martedi/text2onto/text2onto-21
0207-noinstaller/3rdparty/gate/
CREOLE plugin loaded: file:f://studio/week/martedi/text2onto/text2onto-210207-no
installer/3rdparty/gate/
CREOLE plugin loaded: file:F:/Studio/Week/Martedi/Text2Onto/gate-4.0-build2752-A
LL/plugins/Tools/
CREOLE plugin loaded: file:F:/Studio/Week/Martedi/Text2Onto/gate-4.0-build2752-A
LL/plugins/Stemmer/

LinguisticPreprocessor: creating application f://studio/week/martedi/text2onto/t
ext2onto-210207-noinstaller/3rdparty/gate/english/application.gate ...
gate.creole.annotdelete.AnnotationDeletePR

Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.ontoware.text2onto.gui.Text2Onto.reset(Unknown Source)
        at org.ontoware.text2onto.gui.Text2Onto.<init>(Unknown Source)
        at org.ontoware.text2onto.gui.Text2Onto.createAndShowGUI(Unknown Source)

        at org.ontoware.text2onto.gui.Text2Onto.access$000(Unknown Source)
        at org.ontoware.text2onto.gui.Text2Onto$1.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
        at java.awt.EventDispatchThread.run(Unknown Source)

根据过去的帖子,我查了下电脑的java版本,是1.6.0_12-b04
用gate安装路径中的jasper-compiler-jdt.jar替换3rdparty\gate中的同名文件的方法也试过了,还是出同样错误……

恳请成功人士的指点!谢~


--  作者:mingsen
--  发布时间:2/24/2009 4:21:00 PM

--  
你这我不懂了,不过可以一起研究下,正好现在的研究重点是本体学习相关的内容,希望能够从关系型数据库、文本、XML中提取语义信息,方便的话,能给把 text2onto发给我看看,我看看能不能看,我的邮箱是wangmingsen4734@126.com
--  作者:monicashu
--  发布时间:2/24/2009 11:13:00 PM

--  
解决了,这个异常是因为<T2O-DIR>中我用的是\而不是/。。。。
(不过我核对了第一次配置的07年的版本,那次我都用的/还是出现同样错误……不管了....)

在text2onto的readme基础上,重新写了份安装说明:

1、解压缩text2onto-091107-noinstaller.zip到<T2O-DIR>  (e.g. c:\text2onto).
http://ontoware.org/projects/text2onto

2. 解压缩gate-4.0-build2752-ALL.zip到<GATE-DIR>.
http://gate.ac.uk/download/index.html

3. 安装WordNet-2.1.exe到 <WN-DIR>.
http://wordnet.princeton.edu/obtain
  
4. 修改<T2O-DIR>/text2onto.properties.(注意地址中斜线的方向,必须是/)

 language=english
 gate_dir=<T2O-DIR>/3rdparty/gate/
 gate_app=application.gate
 jape_main=main.jape
 stop_file=stopwords.txt
 creole_dir=<T2O-DIR>/3rdparty/gate/
 jwnl_properties=<T2O-DIR>/3rdparty/jwnl/file_properties.xml
 temp_corpus=<TEMP-DIR>/text2onto/
 icons=<T2O-DIR>/icons/
 datastore=serial
 tagger_dir=<TAGGER-DIR>/bin/

5. 修改 <T2O-DIR>/3rdparty/jwnl/file_properties.xml.

 [...]
 <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="<WN-DIR>\dict"/>
 </param>
 [...]

6. 修改<T2O-DIR>/Text2onto.bat.

 @echo off
 set T2O=<T2O-DIR>
 set LIB=%T2O%\3rdparty
 set GATE=<GATE-DIR>
 [...]
 
7. 用<GATE-DIR>/lib/jasper-compiler-jdt.jar覆盖<T2O-DIR>/3rdparty/jasper-compiler-jdt.jar
 
8. Start text2onto.bat. 

:) Have fun.


--  作者:vikione
--  发布时间:5/24/2011 4:06:00 PM

--  
方法不错
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
125.000ms