Skip to main content

Python Wrapper for ParallelDots APIs

Project description

A wrapper for the ParallelDots API.

https://badge.fury.io/py/paralleldots.png https://travis-ci.org/ParallelDots/ParallelDots-Python-API.svg?branch=master

Installation

From PyPI:

pip install paralleldots

From source:

https://github.com/ParallelDots/ParallelDots-Python-API.git
python setup.py install

API Keys + Setup

Signup and get your free API key from ParallelDots. You will receive a mail containing the API key at the registered email id.

Configuration:

>>> from paralleldots import set_api_key, get_api_key

# Setting your API key
>>> set_api_key("YOUR API KEY")

# Viewing your API key
>>> get_api_key()

Supported APIs:

  • Semantic Similarity <http://blog.paralleldots.com/technology/semantic-publishing-media-industry/>

  • Sentiment Analysis <http://blog.paralleldots.com/technology/extract-the-context-sentiment-analysis-and-opinion-mining/>

  • Taxonomy

  • Named Entity Extraction ( NER ) <http://blog.paralleldots.com/technology/dig-relevant-text-elements-entity-extraction-api/>

  • Keywords <http://blog.paralleldots.com/technology/extract-weighty-words-keyword-extraction-api/>

  • Intent <http://blog.paralleldots.com/text-analytics/common-use-cases-intent-analysis/>

  • Emotion

  • Multiple Language Sentiment
    • Portuguese ( pt )

    • French ( fr )

Examples

>>> from paralleldots import similarity, ner, taxonomy, sentiment, keywords, intent, emotion, multilang_sentiment

>>> similarity( "Sachin is the greatest batsman", "Tendulkar is the finest cricketer" )
{"actual_score": 0.8429316099720955, "normalized_score": 4.931468684177398, "similarity": 4.931468684177398}

>>> sentiment( "Come on, lets play together" )
{"sentiment": 0.8513014912605286}

>>> taxonomy( "Narendra Modi is the prime minister of India" )
{"tags": [[u"finance", 4.088], [u"government", 3.4284], [u"business", 1.2719]]}

>>> ner( "Narendra Modi is the prime minister of India" )
{"entities": [[u"Modi", 1.0, [u"person"], u""], [u"India", 1.0, [u"org"], u""], [u"Narendra", 1.0, [u"org"], u""]]}

>>> keywords( "Prime Minister Narendra Modi tweeted a link to the speech Human Resource Development Minister Smriti Irani made in the Lok Sabha during the debate on the ongoing JNU row and the suicide of Dalit scholar Rohith Vemula at the Hyderabad Central University." )
{"keywords": [[u"Human Resource Development Minister Smriti Irani", 6], [u"Prime Minister Narendra Modi", 4], [u"Hyderabad Central University", 3], [u"ongoing JNU row", 3], [u"Dalit scholar", 2], [u"Lok Sabha", 2], [u"Rohith Vemula", 2]]}

>>> emotion("Did you hear the latest Porcupine Tree song ? It's rocking !")
{"emotion": "happy"}

>>> intent("Finance ministry calls banks to discuss new facility to drain cash")
{"intent": "news"}

>>> multilang_sentiment("La ville de Paris est très belle", "fr")
{"sentiment": "positive", "confidence_score": 0.998047}

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

ParallelDots-0.8.0.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file ParallelDots-0.8.0.tar.gz.

File metadata

File hashes

Hashes for ParallelDots-0.8.0.tar.gz
Algorithm Hash digest
SHA256 e0a00b512529665831521a951870ff423e4815ad292808df94bb1f9ced3e086d
MD5 b36646dd2220776383450dfeb3939b6f
BLAKE2b-256 f15735913229b32c17d26750d5f55b480f7a7d330a3dfa27aecd6139c49aa04d

See more details on using hashes here.

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