Interested in building your Classifier? to get a free API key.
Premium

try our custom classifier demo

enter a text

In the demo below, provide an input text and some categories (labels) in which you want to classify the text. Depending upon the results you get, you may want to provide some sub-categories for your main category. Sub-Categories should be domain-related keywords for your main category, for eg: You can define sub-categories like "Pitcher","Home run","batter" for a main category like Baseball.

add your categories
Category Sub-Categories
+ Add New Category
result

Ready to Integrate? Check out the API wrappers below

For setup and installation instruction, please visit our Github Page
import paralleldots.ParallelDots; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser;
// Get your API key here
ParallelDots pd = new ParallelDots("<YOUR_API_KEY>");
JSONParser parser = new JSONParser(); JSONObject category = (JSONObject)parser.parse("{\"world politics\": [\"diplomacy\", \"UN\", \"war\"], \"india\": [\"congress\", \"india\", \"bjp\"], \"finance\": [\"markets\", \"economy\", \"shares\"]}".trim()); System.out.println("Custom_Classifier"); String custom_classifier = pd.custom_classifier("Narendra Modi is the Prime Minister of India", category);
System.out.println(custom_classifier);
//Response
{
	"taxonomy": [
		{"tag": "india", "confidence_score": 0.758248}, 
		{"tag": "world politics", "confidence_score": 0.610343}, 
		{"tag": "finance", "confidence_score": 0.371018}
	]
}
For setup and installation instruction, please visit our Github Page
pip install paralleldots
import paralleldots
# Setting your API key
# Get your API key here
paralleldots.set_api_key(<YOUR_API_KEY>)
# Viewing your API key
paralleldots.get_api_key()
category = { "finance": [ "markets", "economy", "shares" ], "world politics": [ "diplomacy", "UN", "war" ] } paralleldots.custom_classifier( "C'est un environnement très hostile, si vous choisissez de débattre ici, vous serez vicieusement attaqué par l'opposition.", category )
#Response
{
	"taxonomy": [
		{'confidence_score': 0.737156, 'tag': 'india'}, 
		{'confidence_score': 0.580833, 'tag': 'world politics'}, 
		{'confidence_score': 0.259185, 'tag': 'finance'}
	]
}
For setup and installation instruction, please visit our Github Page
gem install paralleldots
require 'paralleldots'
# Setting your API key
# Get your API key here
set_api_key(<YOUR_API_KEY>)
# Viewing your API key
get_api_key()
require 'paralleldots'
category = { "finance": [ "markets", "economy", "shares" ], "world politics": [ "diplomacy", "UN", "war" ] } paralleldots.custom_classifier( "C'est un environnement très hostile, si vous choisissez de débattre ici, vous serez vicieusement attaqué par l'opposition.", category )
#Response
{
	"taxonomy": [
		{'confidence_score': 0.737156, 'tag': 'india'}, 
		{'confidence_score': 0.580833, 'tag': 'world politics'}, 
		{'confidence_score': 0.259185, 'tag': 'finance'}
	]
}
For setup and installation instruction, please visit our Github Page
using ParallelDots
using Newtonsoft.Json.Linq;
# Get your API key here
paralleldots pd = new ParallelDots("<YOUR_API_KEY>");
JObject category = JObject.Parse(@"{'world politics': ['diplomacy', 'UN', 'war'], 'india': ['congress', 'india', 'bjp'], 'finance': ['markets', 'economy', 'shares']}");
Console.WriteLine("custom_classifier");
String custom_classifier = pd.custom_classifier("Narendra Modi is the Prime Minister of India", category);
Console.WriteLine(custom_classifier);
#Response
{
	"taxonomy": [
		{"tag": "india", "confidence_score": 0.758248}, 
		{"tag": "world politics", "confidence_score": 0.610343}, 
		{"tag": "finance", "confidence_score": 0.371018}
	]
}
For setup and installation instruction, please visit our Github Page
require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
# Get your API key here
set_api_key("<YOUR_API_KEY>");
get_api_key();
$obj = json_encode((object) ['world politics': ["diplomacy", "UN", "war"], 'india': ["congress", "india", "bjp"], 'finance': ["markets", "economy", "shares"]]); require(__DIR__ . '/vendor/paralleldots/apis/autoload.php');
custom_classifier("Narendra Modi is the Prime Minister of India", $obj);
#Response
{
	"taxonomy": [
		{'confidence_score': 0.737156, 'tag': 'india'}, 
		{'confidence_score': 0.580833, 'tag': 'world politics'}, 
		{'confidence_score': 0.259185, 'tag': 'finance'}
	]
}
How to use custom classifier?

Custom Classifier can be called from the API endpoints, details of which are available here.

custom classifier

A lot of the times, the biggest hindrance to use Machine learning is unavailability of a data-set. There are many people who want to use AI for categorizing data but that needs making a data-set giving rise to a situation similar to a chicken egg problem.

We have built this classifier for text classification which relies on Zero-Shot learning technique called as Custom Classifier. Our base model is trained on a large news corpus of 10 million news articles to discover relationships between sentences and their categories. The resulting model can then generalize on new, unseen categories as well not available in training data.

how our custom classifier api works?

Zero Shot Learning is a way to be able to infer dataset's members without training on it. It is mostly achieved by some form of transfer learning, by which knowledge learned from one dataset can be applied on a different one. While people have proposed multiple zero shot learning approaches for vision tasks where knowledge from imagenet dataset can be used on new ones, we haven't yet seen any example of zero shot learning for text classification.

In our latest research work, we have proposed a method to do zero shot learning on text, where an algorithm trained to learn relationships between sentences and their categories on a large noisy dataset can be made to generalize to new categories or even new datasets. We call the paradigm "Train Once , Test Anywhere". We also propose multiple neural network algorithms that can take advantage of this training methodology and get good results on different datasets. The best method uses an LSTM model for the task of learning relationships. The idea is if one can model the concept of "belongingness" between sentences and classes, the knowledge is useful for unseen classes or even unseen datasets.

read more