吉他回指分辨率工具

时间:2011-02-19 05:34:11

标签: nlp

我找到了一个名为吉他的anophora分辨率工具。

http://cswww.essex.ac.uk/Research/nle/GuiTAR/

我可以发现该工具解决了他们给出的示例的回指,但是我试图执行脚本,它要求在网上无处可用的ltchunk脚本..任何人都可以请告诉我如何使用此工具或任何其他简单的anaphoora解决工具..请..

代码:

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

1 个答案:

答案 0 :(得分:1)

你可能需要做一些逆向工程来弄清楚如何将它放到你引用的管道中,但ltchunk很可能是早期版本的chunker可用作{{3}的一部分包。您可能需要应用整个TTT2管道来使用chunker,因此请查看文档。