吉他照应解析工具

发布于 2024-10-18 07:05:53 字数 3991 浏览 3 评论 0原文

我发现了一个名为吉他的解决隐喻的工具。

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦一生花开无言 2024-10-25 07:05:53

您可能需要进行一些逆向工程才能弄清楚如何将其适合您引用的管道,但是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文