The end-to-end RST-style discourse parsers
1.1K
This repository contains several versions of the IsaNLP RST Parser. Details: https://github.com/tchewik/isanlp_rst
Corpora:
| Tag | Language | Train Data | Test Data | Seg | S | N | R | Full |
|---|---|---|---|---|---|---|---|---|
3.0-gumrrg | En, Ru | GUM, RRG | GUM | 95.5 | 67.4 | 56.2 | 49.6 | 48.7 |
| RRG | 97.0 | 67.1 | 54.6 | 46.5 | 45.4 | |||
3.0-rstdt | En | RST-DT | RST-DT | 97.8 | 75.6 | 65.0 | 55.6 | 53.9 |
3.0-rstreebank | Ru | RRT | RRT | 92.1 | 66.2 | 53.1 | 46.1 | 46.2 |
Run the container tchewik/isanlp_rst:{tag}:
docker run --rm -p 3335:3333 --name rst_rrt tchewik/isanlp_rst:3.0-rstreebank
Connect using isanlp python library:
pip install git+https://github.com/iinemo/isanlp.git
from isanlp import PipelineCommon
from isanlp.processor_remote import ProcessorRemote
# put the container address here ->
address_rst = ('127.0.0.1', 3335)
ppl = PipelineCommon([
(ProcessorRemote(address_rst[0], address_rst[1], 'default'),
['text'],
{'rst': 'rst'})
])
text = ("Парацетамол является широко распространённым центральным ненаркотическим анальгетиком, обладает довольно "
"слабыми противовоспалительными свойствами. Вместе с тем при приёме больших доз может вызывать нарушения "
"работы печени, кровеносной системы и почек. Риски нарушений работы данных органов и систем "
"увеличивается при одновременном принятии спиртного, поэтому лицам, употребляющим алкоголь, рекомендуют "
"употреблять пониженную дозу парацетамола.")
res = ppl(text)
# res['rst'] will contain the binary discourse tree
(Optional) Save the result in rs3 format:
res['rst'].to_rs3('filename.rs3')
Content type
Image
Digest
sha256:819bbc573…
Size
8.9 GB
Last updated
about 2 years ago
docker pull tchewik/isanlp_rst:3.0-rrtrrg