Skip to main content
=================================
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_node_by_index(0)
>>>
>>> root_satellite = root.get_satellite()

To get the saliency score of terminal nodes between 0 and 1:

>>> edus = tree.get_edus()
>>> for edu in edus:
>>> print edu.get_saliency_score()

Test
====

If you directly clone the repository, supposed you have already installed
rstmarcutree, you can test it with:

$ cd tests
$ python test_marcu_classes.py
$ python test_saliency_score.py

Contact
========

For help or if you find any bug write to christian.colonna@studio.unibo.it





Metadata

Release files for rstmarcutree 1.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rstmarcutree 1.0.7
File Size Uploaded Provenance Actions
rstmarcutree-1.0.7.tar.gz 6.5 kB Without provenance Details for rstmarcutree-1.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rstmarcutree 1.0.7
File Interpreter ABI Platform Actions
rstmarcutree-1.0.7-py2-none-any.whl Python 2 none any Details for rstmarcutree-1.0.7-py2-none-any.whl

Total release size: 13.6 kB

Release files / rstmarcutree-1.0.7.tar.gz

Download URL rstmarcutree-1.0.7.tar.gz
Size 6.5 kB
Tags Source
SHA-256 checksum
How to use checksums
9f00a8eaaabfc17c376350fea88825872346a72d490681db626a5de8b7ddce1b
BLAKE2b-256 checksum
How to use checksums
61a89813ccedd6b6b2b8dcf1a0f30cdc347082d9d15693e95a8a64969db88cfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

Release files / rstmarcutree-1.0.7-py2-none-any.whl

Download URL rstmarcutree-1.0.7-py2-none-any.whl
Size 7.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
8a98287c017b4c4e432839327a6f3c0d8491ccf3fffc891c4f6c9735fa94bb29
BLAKE2b-256 checksum
How to use checksums
79fb77776adde374a27da83bd468b68789a117f1bd4a29383ea2760ebdd0d467
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.3

Security for rstmarcutree 1.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page