aisingapore / RST-pointer

huggingface.co
Total runs: 0
24-hour runs: 0
7-day runs: 0
30-day runs: 0
Model's Last Updated: March 02 2023
feature-extraction

Introduction of RST-pointer

Model Details of RST-pointer

RST Pointer

You can test the model at Discourse Parsing .
If you want to find out more information, please contact us at [email protected] .

Table of Contents
Model Details

Model Name: RST-Pointer

  • Description: This is a pointer network-based segmenter and parser that is trained to identify the relations between different sections of a sentence according to rhetorical structure theory (RST).
  • Paper: A Unified Linear-Time Framework for Sentence-Level Discourse Parsing. Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, July 2019 (pp. 4190-4200).
  • Author(s): Lin, X., Joty, S., Jwalapuram, P., & Bari, M. S. (2019).
  • URL: https://aclanthology.org/P19-1410/

How to Get Started With the Model

Install Python package

SGnlp is an initiative by AI Singapore's NLP Hub. They aim to bridge the gap between research and industry, promote translational research, and encourage adoption of NLP techniques in the industry.

Various NLP models, other than aspect sentiment analysis are available in the python package. You can try them out at SGNLP-Demo | SGNLP-Github .

pip install sgnlp
Examples

For more full code (such as RST-Pointer), please refer to this github .
Alternatively, you can also try out the demo for Discourse-Parsing.

Example of RST-Pointer modelling on Discourse Parsing:

from sgnlp.models.rst_pointer import (
    RstPointerParserConfig,
    RstPointerParserModel,
    RstPointerSegmenterConfig,
    RstPointerSegmenterModel,
    RstPreprocessor,
    RstPostprocessor
)

# Load processors and models
preprocessor = RstPreprocessor()
postprocessor = RstPostprocessor()

segmenter_config = RstPointerSegmenterConfig.from_pretrained(
    'https://storage.googleapis.com/sgnlp-models/models/rst_pointer/segmenter/config.json')
segmenter = RstPointerSegmenterModel.from_pretrained(
    'https://storage.googleapis.com/sgnlp-models/models/rst_pointer/segmenter/pytorch_model.bin',
    config=segmenter_config)
segmenter.eval()

parser_config = RstPointerParserConfig.from_pretrained(
    'https://storage.googleapis.com/sgnlp-models/models/rst_pointer/parser/config.json')
parser = RstPointerParserModel.from_pretrained(
    'https://storage.googleapis.com/sgnlp-models/models/rst_pointer/parser/pytorch_model.bin',
    config=parser_config)
parser.eval()

sentences = [
    "Thumbs began to be troublesome about 4 months ago and I made an appointment with the best hand surgeon in the "
    "Valley to see if my working activities were the problem.",
    "Every rule has exceptions, but the tragic and too-common tableaux of hundreds or even thousands of people "
    "snake-lining up for any task with a paycheck illustrates a lack of jobs, not laziness."
]

tokenized_sentences_ids, tokenized_sentences, lengths = preprocessor(sentences)

segmenter_output = segmenter(tokenized_sentences_ids, lengths)
end_boundaries = segmenter_output.end_boundaries

parser_output = parser(tokenized_sentences_ids, end_boundaries, lengths)

trees = postprocessor(sentences=sentences, tokenized_sentences=tokenized_sentences,
                      end_boundaries=end_boundaries,
                      discourse_tree_splits=parser_output.splits)

Training

The dataset (RST Discourse Treebank) that the model is trained on is a licensed dataset.

Training Results
  • Training Time (Segmenter): ~2 hours for 100 epochs on a single V100 GPU for segmenter model.
  • Training Time (Parser): ~6 hours for 200 epochs on a single V100 GPU for parser model

Model Parameters

  • Model Weights: Segmenter | Parser
  • Model Config: Segmenter | Parser
  • Model Inputs: A sentence.
  • Model Outputs: Discourse parsed tree.
  • Model Size: ~362MB for segmenter model, ~361MB for parser model
  • Model Inference Info: Not available.
  • Usage Scenarios: Construct additional features for downstream NLP tasks.

Other Information

License

Runs of aisingapore RST-pointer on huggingface.co

0
Total runs
0
24-hour runs
0
3-day runs
0
7-day runs
0
30-day runs

More Information About RST-pointer huggingface.co Model

More RST-pointer license Visit here:

https://choosealicense.com/licenses/cc-by-nc-sa-4.0

RST-pointer huggingface.co

RST-pointer huggingface.co is an AI model on huggingface.co that provides RST-pointer's model effect (), which can be used instantly with this aisingapore RST-pointer model. huggingface.co supports a free trial of the RST-pointer model, and also provides paid use of the RST-pointer. Support call RST-pointer model through api, including Node.js, Python, http.

aisingapore RST-pointer online free

RST-pointer huggingface.co is an online trial and call api platform, which integrates RST-pointer's modeling effects, including api services, and provides a free online trial of RST-pointer, you can try RST-pointer online for free by clicking the link below.

aisingapore RST-pointer online free url in huggingface.co:

https://huggingface.co/aisingapore/RST-pointer

RST-pointer install

RST-pointer is an open source model from GitHub that offers a free installation service, and any user can find RST-pointer on GitHub to install. At the same time, huggingface.co provides the effect of RST-pointer install, users can directly use RST-pointer installed effect in huggingface.co for debugging and trial. It also supports api for free installation.

RST-pointer install url in huggingface.co:

https://huggingface.co/aisingapore/RST-pointer

Url of RST-pointer

Provider of RST-pointer huggingface.co

aisingapore
ORGANIZATIONS

Other API from aisingapore

huggingface.co

Total runs: 3
Run Growth: 2
Growth Rate: 66.67%
Updated:March 02 2023