Get Started

Introduction

Paralleldots' Deep Learning powered APIs are intelligent tools to extract smart insights from textual or visual data. We're here to guide you get started with Paralleldots' APIs.

The recommended way to install Paralleldots APIs is through our API wrappers, available for multiple languages. For further queries please contact apis@paralleldots.com.

JAVA Wrapper

See more at JAVA

Suppose Your API Key is: ABCdef123MNO456PQR789xyz

Installation

Use the JAR:

>>> Paralleldots.jar

Dependencies:

>>> okhttp-3.9.0.jar
>>> okio-1.13.0.jar

Configuration:

>>> from paralleldots import set_api_key, get_api_key

# Setting your API key
>>> set_api_key("ABCdef123MNO456PQR789xyz")

# Viewing your API key
>>> get_api_key()

Examples

>>> import paralleldots.ParallelDots;

>>> ParallelDots pd = new ParallelDots();
String sentiment = pd.sentiment("Come on, lets play together");
System.out.println(sentiment);

>>> {"probabilities": {"positive": 0.568817,"neutral": 0.400776,"negative": 0.030407}, "sentiment":"positive"}

>>> String similarity = pd.similarity("Sachin is the greatest batsman", "Tendulkar is the finest cricketer");
System.out.println(similarity);

>>> {"actual_score": 0.8429316084125629, "normalized_score": 4.931468682744329, "similarity": 4.931468682744329}

>>> String ner = pd.ner("Narendra Modi is the prime minister of India");
System.out.println(ner);

>>> {"entities": [{"category": ["place"], "name": "India", "confidence_score": 1.0}, {"category": ["person"], "name": "Narendra Modi", "confidence_score": 1.0}]}

>>> String keywords = pd.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.");
System.out.println(keywords);

>>> {"keywords": [{"relevance_score": 6, "keyword": "Human Resource Development Minister Smriti Irani"}, {"relevance_score": 4, "keyword": "Prime Minister Narendra Modi"}, {"relevance_score": 3, "keyword": "Hyderabad Central University"}, {"relevance_score": 3, "keyword": "ongoing JNU row"}, {"relevance_score": 2, "keyword": "Dalit scholar"}, {"relevance_score": 2, "keyword": "Lok Sabha"}, {"relevance_score": 2, "keyword": "Rohith Vemula"}]}

>>> String taxonomy = pd.taxonomy("Narendra Modi is the prime minister of India");
System.out.println(taxonomy);

>>> {"tag": "terrorism", "confidence_score": 0.531435}, {"tag": "world politics", "confidence_score": 0.391963}, {"tag": "politics", "confidence_score": 0.358955}, {"tag": "religion", "confidence_score": 0.308195}, {"tag": "defense", "confidence_score": 0.26187}, {"tag": "business", "confidence_score": 0.20885}, {"tag": "entrepreneurship", "confidence_score": 0.18349}, {"tag": "health", "confidence_score": 0.171121}, {"tag": "technology", "confidence_score": 0.168591}, {"tag": "law", "confidence_score": 0.156953}, {"tag": "education", "confidence_score": 0.146511}, {"tag": "science", "confidence_score": 0.101002}, {"tag": "crime", "confidence_score": 0.085016}, {"tag": "entertainment", "confidence_score": 0.080634}, {"tag": "environment", "confidence_score": 0.078024}, {"tag": "disaster", "confidence_score": 0.075295}, {"tag": "weather", "confidence_score": 0.06784}, {"tag": "accident", "confidence_score": 0.066831}, {"tag": "sports", "confidence_score": 0.058329}, {"tag": "advertising", "confidence_score": 0.054868}, {"tag": "history", "confidence_score": 0.043581}, {"tag": "mining", "confidence_score": 0.03833}, {"tag": "travel", "confidence_score": 0.025517}, {"tag": "geography", "confidence_score": 0.022372}, {"tag": "nature", "confidence_score": 0.013477}, {"tag": "lifestyle", "confidence_score": 0.006467}, {"tag": "automobile", "confidence_score": 0.001161}, {"tag": "personal care", "confidence_score": 0.000275}]}

>>> String emotion = pd.emotion("Did you hear the latest Porcupine Tree song ? It's rocking !");
System.out.println(emotion);

>>> {"emotion": "happy"}

>>> String intent = pd.intent("Finance ministry calls banks to discuss new facility to drain cash");
System.out.println(intent);

>>> {"intent": "news"}

>>> String multilang = pd.multilang("La ville de Paris est très belle", "fr");
System.out.println(multilang);

>>> {"sentiment": "positive", "confidence_score": 0.845703}

>>> String abuse = pd.abuse("you f**king a$$hole");
System.out.println(abuse);

>>> {"sentence_type": "Abusive", "confidence_score": 0.953125}

>>> String sentiment_social = pd.sentiment_social("I left my camera at home");
System.out.println(sentiment_social);

>>> {"probabilities": {"positive": 0.040374, "neutral": 0.491032, "negative": 0.468594}}

>>> String usage = pd.usage();
System.out.println(usage);

>>> {"emotion": 100, "sentiment": 100, "similarity": 100, "taxonomy": 100, "abuse": 100, "intent": 100, "keywords": 100, "ner": 100, "multilang": 100, "sentiment_social": 100}
Python Wrapper

See more at Python.org

Suppose Your API Key is: ABCdef123MNO456PQR789xyz

Installation

From PyPI:

>>> pip install paralleldots

From Source:

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

Configuration:

>>> from paralleldots import set_api_key, get_api_key

# Setting your API key
>>> set_api_key("ABCdef123MNO456PQR789xyz")

# Viewing your API key
>>> get_api_key()

Examples

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

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

>>> sentiment( "Come on, lets play together" )
{"probabilities": {"positive": 0.568817, "neutral": 0.400776, "negative": 0.030407}, "sentiment": "positive"}

>>> taxonomy( "Narendra Modi is the prime minister of India" )
{"tag": "terrorism", "confidence_score": 0.531435}, {"tag": "world politics", "confidence_score": 0.391963}, {"tag": "politics", "confidence_score": 0.358955}, {"tag": "religion", "confidence_score": 0.308195}, {"tag": "defense", "confidence_score": 0.26187}, {"tag": "business", "confidence_score": 0.20885}, {"tag": "entrepreneurship", "confidence_score": 0.18349}, {"tag": "health", "confidence_score": 0.171121}, {"tag": "technology", "confidence_score": 0.168591}, {"tag": "law", "confidence_score": 0.156953}, {"tag": "education", "confidence_score": 0.146511}, {"tag": "science", "confidence_score": 0.101002}, {"tag": "crime", "confidence_score": 0.085016}, {"tag": "entertainment", "confidence_score": 0.080634}, {"tag": "environment", "confidence_score": 0.078024}, {"tag": "disaster", "confidence_score": 0.075295}, {"tag": "weather", "confidence_score": 0.06784}, {"tag": "accident", "confidence_score": 0.066831}, {"tag": "sports", "confidence_score": 0.058329}, {"tag": "advertising", "confidence_score": 0.054868}, {"tag": "history", "confidence_score": 0.043581}, {"tag": "mining", "confidence_score": 0.03833}, {"tag": "travel", "confidence_score": 0.025517}, {"tag": "geography", "confidence_score": 0.022372}, {"tag": "nature", "confidence_score": 0.013477}, {"tag": "lifestyle", "confidence_score": 0.006467}, {"tag": "automobile", "confidence_score": 0.001161}, {"tag": "personal care", "confidence_score": 0.000275}]}

>>> 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." )
[{"relevance_score": 4, "keyword": "Prime Minister Narendra Modi"}, {"relevance_score": 1, "keyword": "link"}, {"relevance_score": 3, "keyword": "speech Human Resource"}, {"relevance_score": 1, "keyword": "Smriti"}, {"relevance_score": 1, "keyword": "Lok"}]

>>> emotion("Did you hear the latest Porcupine Tree song ? It's rocking !")
{"emotion": "other", "probabilities": {"angry": 0.010629, "other": 0.453988, "sad": 0.028748, "excited": 0.2596, "happy": 0.247035}

>>> intent("Finance ministry calls banks to discuss new facility to drain cash")
{"probabilities": {"news": 0.946028, "other": 0.015853, "query": 0.000412, "feedback/opinion": 0.014115, "spam": 0.023591}}

>>> multilang(""Me encanta jugar al baloncesto", "es")
{"sentiment": "positive", "confidence_score": 1.0}

>>> abuse("you f**king a$$hole")
{"sentence_type": "Abusive", "confidence_score": 0.953125}
>>> sentiment_social("I left my camera at home")
{"probabilities": {"positive": 0.040374, "neutral": 0.491032, "negative": 0.468594}}
>>> usage()
{"emotion": 100,
"sentiment": 100,
"similarity": 100,
"taxonomy": 100,
"abuse": 100,
"intent": 100,
"keywords": 100,
"ner": 100,
"multilang": 100,
"sentiment_social": 100}
Ruby Wrapper

See more at Rubygems

Suppose Your API Key is: ABCdef123MNO456PQR789xyz

Installation

From Gem:
> gem install paralleldots

Configuration

> require 'paralleldots'

# Setting your API key
> set_api_key("ABCdef123MNO456PQR789xyz")

# Viewing your API key
> get_api_key()

Examples

> require 'paralleldots'

> similarity( "Sachin is the greatest batsman", "Tendulkar is the finest cricketer" )
{"actual_score"=>0.842932, "normalized_score"=>4.931469}

> sentiment( "Come on, lets play together" )
{"probabilities"=>{"positive"=>0.568817, "neutral"=>0.400776, "negative"=>0.030407}, "sentiment"=>"positive"}

> taxonomy( "Narendra Modi is the prime minister of India" )
{"taxonomy"=>[
{"tag"=>"terrorism", "confidence_score"=>0.531435},
{"tag"=>"world politics", "confidence_score"=>0.391963},
{"tag"=>"politics", "confidence_score"=>0.358955},
{"tag"=>"religion", "confidence_score"=>0.308195},
{"tag"=>"defense", "confidence_score"=>0.26187},
{"tag"=>"business", "confidence_score"=>0.20885},
{"tag"=>"entrepreneurship", "confidence_score"=>0.18349},
{"tag"=>"health", "confidence_score"=>0.171121},
{"tag"=>"technology", "confidence_score"=>0.168591},
{"tag"=>"law", "confidence_score"=>0.156953},
{"tag"=>"education", "confidence_score"=>0.146511},
{"tag"=>"science", "confidence_score"=>0.101002},
{"tag"=>"crime", "confidence_score"=>0.085016},
{"tag"=>"entertainment", "confidence_score"=>0.080634},
{"tag"=>"environment", "confidence_score"=>0.078024},
{"tag"=>"disaster", "confidence_score"=>0.075295},
{"tag"=>"weather", "confidence_score"=>0.06784},
{"tag"=>"accident", "confidence_score"=>0.066831},
{"tag"=>"sports", "confidence_score"=>0.058329},
{"tag"=>"advertising", "confidence_score"=>0.054868},
{"tag"=>"history", "confidence_score"=>0.043581},
{"tag"=>"mining", "confidence_score"=>0.03833},
{"tag"=>"travel", "confidence_score"=>0.025517},
{"tag"=>"geography", "confidence_score"=>0.022372},
{"tag"=>"nature", "confidence_score"=>0.013477},
{"tag"=>"lifestyle", "confidence_score"=>0.006467},
{"tag"=>"automobile", "confidence_score"=>0.001161},
{"tag"=>"personal care", "confidence_score"=>0.000275}
]}

> ner( "Narendra Modi is the prime minister of India" )
{"entities"=>[{"category"=>"name", "name"=>"Narendra Modi", "confidence_score"=>0.951439}, {"category"=>"place", "name"=>"India", "confidence_score"=>0.9263}]}

> 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=>{"keywords"=>[{"relevance_score"=>4, "keyword"=>"Prime Minister Narendra Modi"}, {"relevance_score"=>1, "keyword"=>"link"}, {"relevance_score"=>3, "keyword"=>"speech Human Resource"}, {"relevance_score"=>1, "keyword"=>"Smriti"}, {"relevance_score"=>1, "keyword"=>"Lok"}], "usage"=>"By accessing ParallelDots API or using information generated by ParallelDots API, you are agreeing to be bound by the ParallelDots API Terms of Use: http://www.paralleldots.com/terms-and-conditions"}}

> emotion("Did you hear the latest Porcupine Tree song ? It's rocking !")
{"emotion"=>"other", "probabilities"=>{"angry"=>0.010629, "other"=>0.453988, "sad"=>0.028748, "excited"=>0.2596, "happy"=>0.247035}}

> intent("Finance ministry calls banks to discuss new facility to drain cash")
{"probabilities"=>{"news"=>0.946028, "other"=>0.015853, "query"=>0.000412, "feedback/opinion"=>0.014115, "spam"=>0.023591}, "intent"=>"news"}

> abuse("you f**king a$$hole")
{"confidence_score"=>0.998047, "sentence_type"=>"Abusive"}

> multilang("Me encanta jugar al baloncesto", "es")
{"sentiment": "positive", "confidence_score": 1.0}

> sentiment_social("I left my camera at home")
{"probabilities"=>{"positive"=>0.040374, "neutral"=>0.491032, "negative"=>0.468594}, "sentiment"=>"neutral"}

> usage()
{
"emotion": 100,
"sentiment": 100,
"similarity": 100,
"taxonomy": 100,
"abuse": 100,
"intent": 100,
"keywords": 100,
"ner": 100,
"multilang": 100,
"sentiment_social": 100
}
C# Wrapper

See more at Nuget

Suppose Your API Key is: ABCdef123MNO456PQR789xyz

Installation

PM> Install-Package ParallelDots

Configuration

# Import wrapper namespace
using wrapper

# Initialize instance of api class
wrapper.api pd = new wrapper.api("ABCdef123MNO456PQR789xyz");

Examples

var sentiment = pd.sentiment("Come on, lets play together");
Console.WriteLine(sentiment);

{"probabilities": {"positive": 0.568817,"neutral": 0.400776,"negative": 0.030407}, "sentiment":"positive"}

var similarity = pd.similarity("Sachin is the greatest batsman", "Tendulkar is the finest cricketer");
Console.WriteLine(similarity);

{"actual_score": 0.8429316084125629, "normalized_score": 4.931468682744329, "similarity": 4.931468682744329}

var ner = pd.ner("Narendra Modi is the prime minister of India");
Console.WriteLine(ner);

{"entities": [{"category": ["place"], "name": "India", "confidence_score": 1.0}, {"category": ["person"], "name": "Narendra Modi", "confidence_score": 1.0}]}

var keywords = pd.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.");
Console.WriteLine(keywords);

{"keywords": [{"relevance_score": 6, "keyword": "Human Resource Development Minister Smriti Irani"}, {"relevance_score": 4, "keyword": "Prime Minister Narendra Modi"}, {"relevance_score": 3, "keyword": "Hyderabad Central University"}, {"relevance_score": 3, "keyword": "ongoing JNU row"}, {"relevance_score": 2, "keyword": "Dalit scholar"}, {"relevance_score": 2, "keyword": "Lok Sabha"},
{"relevance_score": 2, "keyword": "Rohith Vemula"}]}

var taxonomy = pd.taxonomy("Narendra Modi is the prime minister of India");
Console.WriteLine(taxonomy);

var emotion = pd.emotion("Did you hear the latest Porcupine Tree song ? It's rocking !");
Console.WriteLine(emotion);

{"emotion": "happy"}

var intent = pd.intent("Finance ministry calls banks to discuss new facility to drain cash");
Console.WriteLine(intent);

{"intent": "news"}

var multilang = pd.multilang("La ville de Paris est très belle", "fr");
Console.WriteLine(multilang);
{"sentiment": "positive", "confidence_score": 0.845703}

var abuse = pd.abuse("Is this content Abusive?");
Console.WriteLine(abuse);

{"sentence_type": "Abusive", "confidence_score": 0.953125}

var sentiment_social = sentiment_social("I left my camera at home")
Console.WriteLine(sentiment_social);

{"probabilities": {"positive": 0.040374, "neutral": 0.491032, "negative": 0.468594}}

var usage = pd.usage();
Console.WriteLine(usage);

{"emotion": 100, "sentiment": 96, "similarity": 100, "taxonomy": 100, "abuse": 100, "intent": 100, "keywords": 100, "ner": 100, "multilang": 100, "sentiment_social": 97}
PHP Wrapper

See more at Packagist

Suppose Your API Key is: ABCdef123MNO456PQR789xyz

Requirement

Install cCurl on your system if not present.
For ubuntu use sudo apt-get install php-curl


Installation

Create a composer.json file in your project's directory. Write the following in the file:
{
"require": {
"paralleldots/apis": "*"
},
"minimum-stability": "dev"
}
Run the following command in the same directory (NOTE: You must have composer installed): composer install

Configuration

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
# Setting your API key
set_api_key("ABCdef123MNO456PQR789xyz");
# Viewing your API key
get_api_key();
?>

Examples

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
sentiment("Come on, lets play together");
?>
{"probabilities":{"positive":0.568817, "neutral":0.400776, "negative":0.030407}, "sentiment":"positive"}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
similarity("Sachin is the greatest batsman", "Tendulkar is the finest cricketer");
?>
{"actual_score": 0.8429316084125629, "normalized_score": 4.931468682744329, "similarity": 4.931468682744329}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
ner("Narendra Modi is the prime minister of India");
?>
{"entities": [{"category": ["place"], "name": "India", "confidence_score": 1.0}, {"category": ["person"], "name": "Narendra Modi",
"confidence_score": 1.0}]}

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": [{"relevance_score": 6, "keyword": "Human Resource Development Minister Smriti Irani"}, {"relevance_score": 4, "keyword": "Prime Minister Narendra Modi"}, {"relevance_score": 3, "keyword": "Hyderabad Central University"}, {"relevance_score": 3, "keyword": "ongoing JNU row"}, {"relevance_score": 2, "keyword": "Dalit scholar"}, {"relevance_score": 2, "keyword": "Lok Sabha"}, {"relevance_score": 2, "keyword": "Rohith Vemula"}]} {"tag": "terrorism", "confidence_score": 0.531435}, {"tag": "world politics", "confidence_score": 0.391963}, {"tag": "politics", "confidence_score": 0.358955}, {"tag": "religion", "confidence_score": 0.308195}, {"tag": "defense", "confidence_score": 0.26187}, {"tag": "business", "confidence_score": 0.20885}, {"tag": "entrepreneurship", "confidence_score": 0.18349}, {"tag": "health", "confidence_score": 0.171121}, {"tag": "technology", "confidence_score": 0.168591}, {"tag": "law", "confidence_score": 0.156953}, {"tag": "education", "confidence_score": 0.146511}, {"tag": "science", "confidence_score": 0.101002}, {"tag": "crime", "confidence_score": 0.085016}, {"tag": "entertainment", "confidence_score": 0.080634}, {"tag": "environment", "confidence_score": 0.078024}, {"tag": "disaster", "confidence_score": 0.075295}, {"tag": "weather", "confidence_score": 0.06784}, {"tag": "accident", "confidence_score": 0.066831}, {"tag": "sports", "confidence_score": 0.058329}, {"tag": "advertising", "confidence_score": 0.054868}, {"tag": "history", "confidence_score": 0.043581}, {"tag": "mining", "confidence_score": 0.03833}, {"tag": "travel", "confidence_score": 0.025517}, {"tag": "geography", "confidence_score": 0.022372}, {"tag": "nature", "confidence_score": 0.013477}, {"tag": "lifestyle", "confidence_score": 0.006467}, {"tag": "automobile", "confidence_score": 0.001161}, {"tag": "personal care", "confidence_score": 0.000275}]} require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
emotion("Did you hear the latest Porcupine Tree song ? It's rocking !");
?>
{"emotion": "happy"}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
intent("Finance ministry calls banks to discuss new facility to drain cash");
?>
{"intent": "news"}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
multilang("La ville de Paris est très belle", "fr");
?>
{"sentiment": "positive", "confidence_score": 0.845703}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
abuse("you f**king a$$hole");
?>
{"sentence_type": "Abusive", "confidence_score": 0.953125}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
sentiment_social("I left my camera at home");
?>
{"probabilities": {"positive": 0.040374, "neutral": 0.491032, "negative": 0.468594}}

require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
usage();
?>
{
"emotion": 100,
"sentiment": 100,
"similarity": 100,
"taxonomy": 100,
"abuse": 100,
"intent": 100,
"keywords": 100,
"ner": 100,
"multilang": 100,
"sentiment_social": 100
}

Get Your Free API Key


Get Free API Key