Sign inSign up

tchewik/isanlp_rst

By tchewik

•Updated about 2 years ago

The end-to-end RST-style discourse parsers

Image
Machine learning & AI
1

1.1K

tchewik/isanlp_rst repository overview

This repository contains several versions of the IsaNLP RST Parser. Details: https://github.com/tchewik/isanlp_rst⁠

⁠Performance

Corpora:

  • English: GUM9.1, RST-DT
  • Russian: RRT2.1, RRGGUM-9.1
TagLanguageTrain DataTest DataSegSNRFull
3.0-gumrrgEn, RuGUM, RRGGUM95.567.456.249.648.7
RRG97.067.154.646.545.4
3.0-rstdtEnRST-DTRST-DT97.875.665.055.653.9
3.0-rstreebankRuRRTRRT92.166.253.146.146.2

⁠

⁠Usage

  1. Run the container tchewik/isanlp_rst:{tag}:

    docker run --rm -p 3335:3333 --name rst_rrt tchewik/isanlp_rst:3.0-rstreebank
    
  2. 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
    
  3. (Optional) Save the result in rs3 format:

    res['rst'].to_rs3('filename.rs3')
    

Tag summary

Content type

Image

Digest

sha256:819bbc573…

Size

8.9 GB

Last updated

about 2 years ago

docker pull tchewik/isanlp_rst:3.0-rrtrrg