吉他照应解析工具
我发现了一个名为吉他的解决隐喻的工具。
http://cswww.essex.ac.uk/Research/nle/GuiTAR/
我可以发现该工具解决了他们给出的示例的照应问题,但是我尝试执行该脚本,它要求 ltchunk 脚本,而该脚本在网络上找不到。任何人都可以告诉我如何使用该工具或任何其他简单的照应解析工具..请..
代码:
cat $1 |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[\[" "@|" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]\]" "|@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(\(" "@~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)\)" "~@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(" "~~~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)" "~~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[" "@@@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]" "@@" |
ltchunk -show_tags |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[\[" "<ne>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]\]" "</ne>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(\(" "<ve>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)\)" "</ve>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@\|" " [_( [_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\|@" " ]_) ]_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@~" " (_( (_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~@" " )_) )_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~~~" " (_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~~" " )_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@@@" " [_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@@" " ]_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\._\." " ._. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\?_\." " ?_. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\!_\." " !_. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\;_:" " ;_: " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\:_:" " :_: " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer \"_ " "\"_ |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "'_" " '_" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "'s_" " 's_" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.XMLConverter $2
######## COMMENTS #########
### A script that opens a file provided as a parameter
### and replaces a given pattern of characters with a replacement string.
### The replacements go as follows:
### Pre-ltchunk processing:
### A sequence '[[', ']]', '((', or '))' in the original file
### is replaced by '@|', '|@', '@~', '~@' respectively.
### Then ltchunk is run over the resulting file.
### Post-ltchunk processing:
### A sequence '[[', ']]', '((', or '))'
### is replaced by '<ne>', '</ne>', '<ve>', '</ve>' respectively.
### And finally return the original symbols hided during the pre-processing phase:
### A sequence '@|', '|@', '@~', '~@'
### is replaced by '[_([_(', ']_)]_)', '(_((_(', ')_))_)' respectively.
### The original symbols are returned in a format as if they were also processed by ltchunk.
### Notes:
### ne - stands for nominal expression
### ve - stands for verbal expression
I found a tool for anophora resolution named as guitar.
http://cswww.essex.ac.uk/Research/nle/GuiTAR/
I can find that the tool solves anaphora for the example they have given, but ehrn i try to execute the script, it asks for ltchunk script which is nowhere available on net.. can anyone please tell me how to use this tool or any other simple anaphoora resolution tool.. please..
code:
cat $1 |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[\[" "@|" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]\]" "|@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(\(" "@~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)\)" "~@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(" "~~~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)" "~~" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[" "@@@" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]" "@@" |
ltchunk -show_tags |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\[\[" "<ne>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\]\]" "</ne>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\(\(" "<ve>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\)\)" "</ve>" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@\|" " [_( [_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\|@" " ]_) ]_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@~" " (_( (_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~@" " )_) )_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~~~" " (_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "~~" " )_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@@@" " [_( " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "@@" " ]_) " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\._\." " ._. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\?_\." " ?_. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\!_\." " !_. " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\;_:" " ;_: " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "\:_:" " :_: " |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer \"_ " "\"_ |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "'_" " '_" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.StringReplacer "'s_" " 's_" |
java -cp gtar1.1.jar uk.ac.essex.malexa.nlp.dp.GuiTAR.txtToXML.XMLConverter $2
######## COMMENTS #########
### A script that opens a file provided as a parameter
### and replaces a given pattern of characters with a replacement string.
### The replacements go as follows:
### Pre-ltchunk processing:
### A sequence '[[', ']]', '((', or '))' in the original file
### is replaced by '@|', '|@', '@~', '~@' respectively.
### Then ltchunk is run over the resulting file.
### Post-ltchunk processing:
### A sequence '[[', ']]', '((', or '))'
### is replaced by '<ne>', '</ne>', '<ve>', '</ve>' respectively.
### And finally return the original symbols hided during the pre-processing phase:
### A sequence '@|', '|@', '@~', '~@'
### is replaced by '[_([_(', ']_)]_)', '(_((_(', ')_))_)' respectively.
### The original symbols are returned in a format as if they were also processed by ltchunk.
### Notes:
### ne - stands for nominal expression
### ve - stands for verbal expression
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能需要进行一些逆向工程才能弄清楚如何将其适合您引用的管道,但是
ltchunk
很可能是作为 LT-TTT2 软件包。您可能需要应用整个 TTT2 管道才能使用分块器,因此请查看文档。You will probably have to do a bit of reverse engineering to figure out how to fit this into the pipeline you quoted, but
ltchunk
is very likely an earlier version of the chunker available as part of the LT-TTT2 package. You probably need to apply the entire TTT2 pipeline to use the chunker, so check out the documentation.