A project to load rst discourse tree enriched with Marcu attribute from .dis files
Project description
=================================
Installing and using RstMarcuTree
=================================
Introduction
============
This library helps you to process a Rhetorical Structure Theory Discourse Tree
It returns a RSTTree representing the tree composed by RSTNode.
The tree is enriched with attribute like promotion set described by Daniel Marcu in paper:
* Building up rhetorical structure tree 1996
* Discourse trees are good indicators of importance in test 1999
Installation
============
RstMarcuTree has support for python 2.7
dependencies: discoursegraphs
$ pip2.7 install rstmarcutree
Usage
=====
The library process a file containing a rst tree in .dis format.
You can use online discourse dependency parser like feng hirst 2014 parser to produce
a discourse tree of a text.
Vanessa Wei Feng and Graeme Hirst, 2014.
A Linear-Time Bottom-Up Discourse Parser with Constraints and Post-Editing.
Vanessa Wei Feng and Graeme Hirst, 2014.
Two-pass Discourse Segmentation with Pairing and Global Features.
You can use:
https://github.com/NLPbox/rst-converter-service
to easily convert the file in .dis output:
having ./test_rst.dis file path in python2.7 console or script you can just just:
>>> from rstmarcutree import load_tree
>>>
>>> rst_tree = load_tree('./test_rst.dis')
>>>
>>> root = rst_tree.get(0)
>>>
>>> root_satellite = root.get_satellite()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
rstmarcutree-1.0.2.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for rstmarcutree-1.0.2-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3a4c5307c6e0207507f1f307c39cb345d0a17e5caa1f8030dbccb94ff64c284 |
|
MD5 | 11c5f6f61354852c3e469dbf854a1896 |
|
BLAKE2b-256 | 8b7db15d0ad12d3312b9f8402be7e98f4e0991056057399fee4e1154e24bd9ff |