Skip to main content

Just a Python Version of SupWSD Pocket: A software suite for SUPervised Word Sense Disambiguation

Project description

PySupWSDPocket

Just a Python Version of SupWSD Pocket: A software suite for SUPervised Word Sense Disambiguation.

Suport langugae

  • en, fr, de, it, es.

Suport Model

  • the model to be used in the disambiguation process: SEMCOR (English only), SEMCOR_OMSTI (English only), TRAIN_O_MATIC.
    If you don't specify the model, the program will load the default one: semcor_omsti for English, train_o_matic for other languages.

Installing

pip install pysupwsdpocket

or

pip install pysupwsdpocket -U

Install Model Language

Download the templates to the path: /home/your_user/pysupwsdpocket_models

Guide Start

example.py

from pysupwsdpocket import PySupWSDPocket

sentence = 'The human brain is quite proficient at word-sense disambiguation.'

nlp = PySupWSDPocket(lang='en', model='semcor_omsti')
doc = nlp.wsd(raw_text=sentence)
print(doc)

Running CLI

sentence the sentence to be analyzed.
dataset the path of the file containing the sentences to be analyzed (one sentence per line).

pysupwsd -wsd <sentence|dataset> <lang> <model>

pysupwsdpocket -wsd 'The human brain is quite proficient at word-sense disambiguation.' en semcor_omsti

Credits

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

pysupwsdpocket-0.0.7.tar.gz (3.5 kB view hashes)

Uploaded Source

Built Distributions

pysupwsdpocket-0.0.7-py3.7.egg (1.4 MB view hashes)

Uploaded Source

pysupwsdpocket-0.0.7-py3-none-any.whl (1.4 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page