eContext API documentation¶
Introduction¶
The eContext API exposes the functionality of the eContext platform to developers via a RESTful API. The general purpose is to provide access to eContext’s hierarchical category structure, or Taxonomy; to allow for real-time classification of data to the taxonomy; and to allow for keyword retrieval from the eContext dataset utilizing rich searching and filtering capabilities.
Taxonomy Overlay¶
The eContext API can be used to classify content to 3rd party taxonomies, including industry standard taxonomies like the IAB, or custom client specific taxonomies. Contact our Client Services Team to learn more about the standard overlays we support, or commission a custom overlay.
Input Format¶
The input format to the eContext API is specified using the HTTP Content-Type
header (RFC 2616#section-14.17). A Content-Type of application/json
is
preferred, and there is no guarantee that other Content-Types will be honored.
Output Format¶
The output format is generally set by using the HTTP Accept header (RFC 2616#section-14.1).
The default output format for the eContext API is JSON (application/json
). As the default
output format, all examples in this documentation are displayed using JSON.
The following output formats are currently supported:
- application/json (RFC 4627)
Best Practices¶
Rule-Based vs. Model-Based Classification¶
eContext offers a unique combination of curated, rule-based classification and machine learned, neural network model-based classification. Users can request classification from one or the other, or use a hybrid ML + rule-based system.
Classification results from the rule-based system can come from any one of eContext’s 500,000+ topic categories, across its 20+ levels of the hierarchy. Classification from the model-based system can come from one of approximately 2,000 topic categories at the first 3 levels of depth in the hierarchy.
Users can select the method they wish to use with the classification_type
parameter, and the values below:
Value | Description |
---|---|
0 | Uses a hybrid ML + rule-based methodology (default for classify/text, classify/html, classify/url, and classify/keywords) |
1 | Rule-based method, only (default for classify/social) |
2 | Mode-based method, only |
When machine learning models are being utilized, by default, eContext filters out predictions that fall below a certain probability threshold. This threshold can be adjusted by passing in an ml_threshold
parameter with a float value between 0.0 and 1.0.
{
"classification_type": 2,
"ml_threshold": 0.70,
"social": [
"han and luke"
]
}
Fixing Classification Results to a Point in Time¶
eContext is continually expanding and improving its classification abilities, adding & removing categories in its hierarchy and altering rules that guide classification. New data is available in the eContext service every 24 hours (00:00 UTC).
However, there may be cases where users do not want the classification to change over the course of a long-running job or while processing batches of content across several days.
To ensure this consistency, users may pass in the taxonomy_timestamp
parameter with their request. This parameter accepts a unix timestamp which will instruct the engine to ignore any changes made to the classification system after this date. Any timestamp within the past three weeks is considered valid. See the below example:
{
"async":false,
"taxonomy_timestamp":1514764800,
"social":[
"happy new year!"
]
}
Authentication¶
Authentication in the eContext API is handled using Basic HTTP Authentication (RFC 2617) over an SSL secured connection. Please contact eContext directly for login credentials. The HTTP Authorization header (RFC 2616#section-14.8) should be included with each request to the eContext API.
All calls described in the following documentation assume that you include the proper authentication with each call.
Objects¶
Contents
Category¶
A Category is the base classification object in the eContext platform. A typical Category will contain an id, a name, a path where the Category resides in the eContext Taxonomy, and the ids of each element in that path.
Each Category exists in exactly one location in the eContext Taxonomy and has only one parent. Categories may be altered over time, the content classified to them may differ, and their name, path, and idpath values may change. However, a Category will always keep the same id. A Category may represent a thing, place, person, product, service, or an abstract concept.
{
"id": "d974b27c85b666e371d1a2f5d50d5d48",
"name": "Breaking Bad",
"path": [
"Arts & Entertainment",
"Movies & Television",
"Movie & TV Products",
"TV",
"Drama TV Shows",
"Breaking Bad"
],
"idpath": [
"90a7a21c5fe42569fb5bb0d28ce9f77a",
"7dde2749bbff96f9c111a50d8dd12fd8",
"c4d86afd19597a9bd040fee32df9b318",
"74c4ca4f7550a6267e1c0d1b5552465c",
"fe88b63f0fdb129d97fe996c05d3ebf1",
"d974b27c85b666e371d1a2f5d50d5d48"
],
"stats": {
"social_relevance": 0.0000432244,
"social_idf": 9.8314479757,
"commercial_score": 0.3
},
"facets": [
[
"domain",
"product"
],
[
"brand",
"breaking bad"
]
]
}
Attribute | Description |
---|---|
id | A unique identifier for this Category. Please note that ids are encoded to each account, and the ids shown in these examples will not be the same as those received from the service |
name | The name of this Category |
path | The path for this Category in the eContext Taxonomy |
idpath | The path for this Category using ids |
stats | Useful statistics associated with this Category |
stats.social_relevance | The percentage of conversations found in eContext’s Social Media feeds over the past month that address this specific Category. This statistic only applies to the single Category object, and does not aggregate or sum categories deeper in its hierarchical path |
stats.social_idf | The Inverse Document Frequency of this Category. See below for more details |
commercial_score | A value (0.0 - 1.0) representing the competition and cost of digital advertising around the category topic |
facets | A list of values describing aspects of the category. See below for examples of response values |
stats.social_idf¶
This statistic provides partial data for computing TF-IDF for categories in the Social space. Social IDF is calculated from conversations compiled from eContext’s feeds of Social Media data over the past month. The provided number is calculated as follows:
Where:
- \(N\) = Total number of documents in the corpus
- \(|\{d \in D: t \in d\}|\) = number of documents where the Category t appears
Please note that in this context, a term is a Category, not a lexeme, but can be useful for removing Category noise from your results.
stats.social_relevance¶
This statistic provides information about the relevance of a particular Category in in eContext’s Social Media feeds over the past month and is calculated as follows:
Where:
- \(|\{d \in D: t \in d\}|\) = number of documents where the Category t appears
- \(C\) = Sum of all categories found in each document the corpus
Facets¶
Facets add detail to the nature of a category topic, and can be useful for organizing classifications across different paths and verticals.
For example, linking categories for the Brand “Honda”, whether they appear in “Home & Garden” (Honda Lawn Mowers) or “Vehicles” (Honda Accord).
Below are some examples of possible values pairs returned in the Facets list. Additional Facet Types will be released in future versions.
Facet Type | Example Facet Value/s | Description |
---|---|---|
Domain | Product, Service, Facility, Information | A broad class describing if a category is a commercial item or piece of IP; an action or practice; a place; or an abstract concept |
Brand | Apple, Honda, et al | The brand name associated with a category. May also be the name of a Person or piece of intellectual property (like a film series or TV show) |
Product Line | iPhone, Accord, et al | A distinguishing name given to a set of items or services offered by a Brand |
Overlay¶
An overlay object provides a map from the eContext taxonomy to a client’s own taxonomy, and/or an industry standard taxonomy, like the IAB Content Taxonomy. Overlays are only available to select clients at this time. Please contact our Client Services Team to learn more about the standard overlays we support, or commission a custom overlay.
In general, the overlay object itself will contain a dictionary of eContext Category ids that correspond to the categories dictionary, and then matching categories inside each subscribed taxonomy overlay.
For example, if a user is subscribed to the IAB taxonomy overlay, the output for the following classify/keywords call might look like this:
curl -X POST -H "Authorization: Basic __AUTHENTICATION__" -H "Content-Type: application/json" -d '{
"async":false,
"keywords":[
"baby strollers",
"chicago bears"
]
}' "https://api.econtext.com/v2/classify/keywords"
{
"econtext": {
"classify": {
"mappings": [
"33ffa2f8cae5b84455321ab2575441fe",
"85edc49558d9373a4a5bcfc6eb0bac90"
],
"categories": {
"33ffa2f8cae5b84455321ab2575441fe": {
"id": "33ffa2f8cae5b84455321ab2575441fe",
"name": "Strollers",
"path": [
"Home & Garden",
"Baby Needs",
"Baby Products",
"Baby Travel Products",
"Baby Strollers & Carriages",
"Strollers"
],
"idpath": [
"0b1cfd1a5102a974a372e9bc3cfffb35",
"5eae0deb470fb00144d9a73160dc81f4",
"e142965050c94732a5044303907523f6",
"20b3458f5d86613bd46b967a6832bce5",
"83b0847bd055decd09c623c6c451014e",
"33ffa2f8cae5b84455321ab2575441fe"
],
"stats": {
"social_relevance": 0.0000055254,
"social_idf": 12.019372309892,
"commercial_score": 0.6
},
"facets": [
[
"domain",
"product"
]
]
},
"85edc49558d9373a4a5bcfc6eb0bac90": {
"id": "85edc49558d9373a4a5bcfc6eb0bac90",
"name": "Chicago Bears",
"path": [
"Sports",
"Team Sports",
"Football",
"Football Leagues & Teams",
"Professional Football Leagues & Teams",
"NFL",
"National Football Conference",
"National Football Conference - North Division",
"Chicago Bears"
],
"idpath": [
"b00fac5f30dc8dbb660c8d08fe66f487",
"97e2d582fd4e9fe6c9ca51128222e55f",
"1d86d6fea65150be10232959abc02574",
"9398300d477069715ad4682b293fb087",
"04455c6d36d1056a7be0b231e861c0c5",
"f3fafece413cb4e87975d12457ddb9a1",
"4f2d7f778d65a60d35cc53fff475e84f",
"7680bb6c2b3e6babe7bfcc7c44fd752b",
"85edc49558d9373a4a5bcfc6eb0bac90"
],
"stats": {
"social_relevance": 0.0000065315,
"social_idf": 11.852088630462,
"commercial_score": 0.35
},
"facets": [
[
"brand",
"national football league"
],
[
"product line",
"chicago bears"
]
]
}
},
"overlay": {
"33ffa2f8cae5b84455321ab2575441fe": {
"IAB_v2.0_2018": [
[
[
"274",
"Home & Garden"
]
],
[
[
"196",
"Family and Relationships::Parenting::Parenting Babies and Toddlers"
]
]
]
},
"85edc49558d9373a4a5bcfc6eb0bac90": {
"IAB_v2.0_2018": [
[
[
"483",
"Sports"
],
],
[
[
"484",
"Sports::American Football"
]
]
],
}
}
},
"signature": {
"resource": "POST /classify/:type/:result_id",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
In this case, we’re returning categories from the eContext 2018 IAB Taxonomy Overlay that maps from eContext categories to the IAB. The eContext “Strollers” Category maps to the IAB “Home & Garden” and “Parenting Babies and Toddlers” categories, and the eContext “Chicago Bears” Category maps to the IAB “Sports” and “American Football” categories.
Please note that the overlay object will not appear for categories/map or categories/search calls.
Entities¶
In addition to topics from its curated hierarchy, eContext can also use Named Entity Recognition (NER) to return additional information on a document.
Please note that the addition of Named Entity Recognition does increase latency.
Entity recognition is provided for the classify/social, classify/html,
classify/text, and classify/url calls and can be enabled by passing in an
additional parameter with your request object. For example, to retrieve
Entities in a classify/social call you may pass in "entities":true
as shown
in the following example:
{
"entities":true,
"flags":true,
"sentiment":true,
"social":[
"HAPPY PI DAY 3.141592653589793238462643383279502884197169399375...",
"Happy birthday, MIT! The Institute was founded April 10, 1861 by William Barton Rogers. #tbt",
"Consciousness is a state of matter",
"Flying car by @MITAeroAstro spinoff @Terrafugia moves from science fiction to reality",
"Amazing Time-Lapse Video Shows Evolution of #Universe Like Never Before",
"MIT alum @JeopardyJulia now trails only @kenjennings for all-time #Jeopardy! wins",
"Happy b-day Nikola #Tesla! Startup @WiTricity is bringing his ideas on wireless power to life",
"Seen at the Student Center this afternoon: Tetris hash browns!",
"Researchers at @eapsMIT say a large earthquake may occur 5 miles from Istanbul",
"MIT's robotic cheetah can now run and jump untethered",
"Spacesuit from @MITAeroAstro shrink-wraps to astronauts' bodies",
"This social post should be flagged for fireworks and gambling references"
]
}
For each item classified, its recognized entities
will be returned in a separate list from scored_categories
. Entity ids can be referenced in the categories
dictionary to lookup their names, paths, and idpaths. In some cases, one or more of the recognized entities may be synonymous with a Category, and the id for the category will be included in the entities
list, along with an Entity type.
Available Entity types:¶
Entity | Description |
---|---|
PERSON | Names of people |
NORP | Nationalities or religious and political groups |
FAC | Facilities |
ORG | Organizations |
GPE | Geo-political entities |
LOC | Locations that are not GPEs |
PRODUCT | Products |
EVENT | Events |
WORK_OF_ART | Titles of works of art including music, books, paintings, etc |
LAW | Laws and legal documents |
LANGUAGE | Names of Languages |
eContext’s Entity recognition should resolve multiple occurances or references of the same Entity in a document into a single entry. For some location Entities, eContext may provide additional levels of detail by referencing the Entity against a custom gazetteer.
Object Flags¶
Along with classification of content, eContext is able to identify and flag social media posts and keywords for content that may be unsuitable for your audiences. Please note that the addition of content flagging does increase latency.
Social media posts and keywords may be flagged in real-time to the following
categories and can be triggered by passing in "flags":true
in your request object.
eContext offers the following flagging categories. Be advised that these flags are optimized for keyword search & display, and are engineered to over-flag in cases of ambiguity.
ID | Flag Name | Description |
---|---|---|
2 | General | Text fails general standards, including obscene language |
4 | Adult | Text contains adult content |
8 | Alcohol | Text contains content referring to alcohol |
16 | Fireworks | Text contains content referring to fireworks |
32 | Gambling | Text contains content referring to gambling |
64 | Prescription Drugs | Text contains content referring to prescription drugs |
128 | Tobacco and Cigarettes | Text contains content referring to smoking, tobacco, or cigarettes |
256 | Weapons | Text contains content referring to weapons |
2048 | Intent | Text contains either a purchase, comparison, question, or negative intent |
Non-English Content in eContext¶
eContext accepts content in selected non-english languages, as described in this section.
eContext uses a variety of additional technology to support this capability so latency may increase compared to processing content in English. Content in some languages may take longer to process than others.
All eContext Category information is currently returned in English.
Calls that Accept Non-English Content¶
In supported calls, please identify the source language using an ISO 639-1 Code. For example, in a classify/social call you might use the following:
{
"social": [
"5 libros para entender los regímenes militares de América Latina",
"5 discos para llevarse a una isla desierta: ¿cuál te llevarías tú?",
"¿Vale la pena pagar miles de dólares por unos altavoces de música de alta tecnología?",
"Cómo evitar que Facebook publique malos recuerdos en tu muro",
"Los 'drones' inflables con los que las potencias protegerán sus portaaviones",
"Cómo es el recién creado Microlattice, el metal 'más liviano' del mundo",
"5 grandes detectives de la literatura latinoamericana"
],
"source_language": "es"
}
Supported Languages¶
eContext provides support for the following languages:
- Arabic
- German
- Spanish
- French
- Italian
- Portuguese
- Russian
- Turkish
Additional Languages¶
If you need to submit content in a language not included in the list of supported languages, please contact our Client Services Team. eContext is always soliciting feedback on new languages to support, and can iterate quickly if your data demands it.
List of Available Functions¶
NLP¶
Perform Natural Language Processing functions against text strings and documents.
Method | Resource | Description |
---|---|---|
POST | nlp/parse | Performs Part of Speech (POS) tagging, Named Entity Recognition (NER), dependency parsing, tokenization, sentiment analysis, and other core functions of the eContext NLP stack. |
POST | nlp/lid | Identify the language of some text input. |
Categories¶
Classify single keywords into the eContext Taxonomy.
Method | Resource | Description |
---|---|---|
POST | categories/categories | Retrieve a dictionary of Categories and associated Overlays given a list of category ids. |
GET | categories/tiers | Retrieve top tier Categories from the eContext Taxonomy. |
GET | categories/map/:keyword | Retrieve a best map Category from the provided keyword based on the eContext knowledge set. |
GET | categories/search/:keyword | Retrieve a set of possible Categories from the provided keyword based on comparing the keyword with pre-classified keywords in the eContext Dataset. |
Content Classification¶
Classify long-form text context, short-form text content (including social media), the content from URLs or HTML, or lists of keywords into the eContext Taxonomy.
Method | Resource | Description |
---|---|---|
POST | classify/text | Submit plain text for classification. |
POST | classify/social | Submit a list of social posts for classification. |
POST | classify/url | Submit a url to be retrieved and classified. |
POST | classify/html | Submit HTML code for classification. |
POST | classify/keywords | Submit a list of keywords for classification. |
Keywords¶
Retrieve collections of keywords based on executed searches.
Method | Resource | Description |
---|---|---|
POST | keywords/search | Execute a search based on provided parameters. |
GET | keywords/search/:result_id | Retrieve keywords from the specified search. |
User Information¶
Retrieve basic user and billing cycle information.
Method | Resource | Description |
---|---|---|
GET | user/attributes | Return basic information about the current user. |
GET | user/usage | Retrieve the usage information for the current billing cycle. |
GET | user/taxonomies | Retrieve a list of public and privately available taxonomies. |
POST | user/taxonomy | Create a custom taxonomy for use in classification tasks. |
GET | user/taxonomy/:dataset_id | Retrieve a customized taxonomy. |
DELETE | user/taxonomy/:dataset_id | Delete a customized taxonomy. |
Natural Language Processing¶
NLP Calls
POST nlp/parse¶
Performs Part of Speech (POS) tagging, Named Entity Recognition (NER), dependency parsing, tokenization, sentiment analysis, and other core functions of the eContext NLP stack. Connections to this endpoint are currently limited to select users. Please contact us if you’re interested in accessing these functions.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @nlp-parse-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/nlp/parse
The contents of nlp-parse-input.json.json
:
{
"text":"The American Red Cross exists to provide compassionate care to those in need. Our network of generous donors, volunteers and employees share a mission of preventing and relieving suffering, here at home and around the world."
}
POST Response¶
{
"econtext": {
"nlp": {
"doc": {
"sentences": [
{
"index": 0,
"char_offset": [
0,
77
],
"tokens": [
{
"text": "The",
"lemma": "the",
"index": 0,
"char_offset": [
0,
3
],
"part_of_speech": {
"tag": "DT",
"detail": "determiner"
},
"dependency_parse": {
"head_index": 3,
"label": "det"
}
},
{
"text": "American",
"lemma": "American",
"index": 1,
"char_offset": [
4,
12
],
"part_of_speech": {
"tag": "NNP",
"detail": "noun, proper singular"
},
"dependency_parse": {
"head_index": 3,
"label": "compound"
}
},
{
"text": "Red",
"lemma": "Red",
"index": 2,
"char_offset": [
13,
16
],
"part_of_speech": {
"tag": "NNP",
"detail": "noun, proper singular"
},
"dependency_parse": {
"head_index": 3,
"label": "compound"
}
},
{
"text": "Cross",
"lemma": "Cross",
"index": 3,
"char_offset": [
17,
22
],
"part_of_speech": {
"tag": "NNP",
"detail": "noun, proper singular"
},
"dependency_parse": {
"head_index": 4,
"label": "nsubj"
}
},
{
"text": "exists",
"lemma": "exist",
"index": 4,
"char_offset": [
23,
29
],
"part_of_speech": {
"tag": "VBZ",
"detail": "verb, 3rd person singular present"
},
"dependency_parse": {
"head_index": 4,
"label": "ROOT"
}
},
{
"text": "to",
"lemma": "to",
"index": 5,
"char_offset": [
30,
32
],
"part_of_speech": {
"tag": "TO",
"detail": "infinitival to"
},
"dependency_parse": {
"head_index": 6,
"label": "aux"
}
},
{
"text": "provide",
"lemma": "provide",
"index": 6,
"char_offset": [
33,
40
],
"part_of_speech": {
"tag": "VB",
"detail": "verb, base form"
},
"dependency_parse": {
"head_index": 4,
"label": "xcomp"
}
},
{
"text": "compassionate",
"lemma": "compassionate",
"index": 7,
"char_offset": [
41,
54
],
"part_of_speech": {
"tag": "JJ",
"detail": "adjective"
},
"dependency_parse": {
"head_index": 8,
"label": "amod"
}
},
{
"text": "care",
"lemma": "care",
"index": 8,
"char_offset": [
55,
59
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 6,
"label": "dobj"
}
},
{
"text": "to",
"lemma": "to",
"index": 9,
"char_offset": [
60,
62
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 6,
"label": "dative"
}
},
{
"text": "those",
"lemma": "those",
"index": 10,
"char_offset": [
63,
68
],
"part_of_speech": {
"tag": "DT",
"detail": "determiner"
},
"dependency_parse": {
"head_index": 9,
"label": "pobj"
}
},
{
"text": "in",
"lemma": "in",
"index": 11,
"char_offset": [
69,
71
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 10,
"label": "prep"
}
},
{
"text": "need",
"lemma": "need",
"index": 12,
"char_offset": [
72,
76
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 11,
"label": "pobj"
}
},
{
"text": ".",
"lemma": ".",
"index": 13,
"char_offset": [
76,
77
],
"part_of_speech": {
"tag": ".",
"detail": "punctuation mark, sentence closer"
},
"dependency_parse": {
"head_index": 4,
"label": "punct"
}
}
]
},
{
"index": 1,
"char_offset": [
78,
224
],
"tokens": [
{
"text": "Our",
"lemma": "-PRON-",
"index": 14,
"char_offset": [
78,
81
],
"part_of_speech": {
"tag": "PRP$",
"detail": "pronoun, possessive"
},
"dependency_parse": {
"head_index": 15,
"label": "poss"
}
},
{
"text": "network",
"lemma": "network",
"index": 15,
"char_offset": [
82,
89
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 23,
"label": "nsubj"
}
},
{
"text": "of",
"lemma": "of",
"index": 16,
"char_offset": [
90,
92
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 15,
"label": "prep"
}
},
{
"text": "generous",
"lemma": "generous",
"index": 17,
"char_offset": [
93,
101
],
"part_of_speech": {
"tag": "JJ",
"detail": "adjective"
},
"dependency_parse": {
"head_index": 18,
"label": "amod"
}
},
{
"text": "donors",
"lemma": "donor",
"index": 18,
"char_offset": [
102,
108
],
"part_of_speech": {
"tag": "NNS",
"detail": "noun, plural"
},
"dependency_parse": {
"head_index": 16,
"label": "pobj"
}
},
{
"text": ",",
"lemma": ",",
"index": 19,
"char_offset": [
108,
109
],
"part_of_speech": {
"tag": ",",
"detail": "punctuation mark, comma"
},
"dependency_parse": {
"head_index": 18,
"label": "punct"
}
},
{
"text": "volunteers",
"lemma": "volunteer",
"index": 20,
"char_offset": [
110,
120
],
"part_of_speech": {
"tag": "NNS",
"detail": "noun, plural"
},
"dependency_parse": {
"head_index": 18,
"label": "conj"
}
},
{
"text": "and",
"lemma": "and",
"index": 21,
"char_offset": [
121,
124
],
"part_of_speech": {
"tag": "CC",
"detail": "conjunction, coordinating"
},
"dependency_parse": {
"head_index": 20,
"label": "cc"
}
},
{
"text": "employees",
"lemma": "employee",
"index": 22,
"char_offset": [
125,
134
],
"part_of_speech": {
"tag": "NNS",
"detail": "noun, plural"
},
"dependency_parse": {
"head_index": 20,
"label": "conj"
}
},
{
"text": "share",
"lemma": "share",
"index": 23,
"char_offset": [
135,
140
],
"part_of_speech": {
"tag": "VBP",
"detail": "verb, non-3rd person singular present"
},
"dependency_parse": {
"head_index": 23,
"label": "ROOT"
}
},
{
"text": "a",
"lemma": "a",
"index": 24,
"char_offset": [
141,
142
],
"part_of_speech": {
"tag": "DT",
"detail": "determiner"
},
"dependency_parse": {
"head_index": 25,
"label": "det"
}
},
{
"text": "mission",
"lemma": "mission",
"index": 25,
"char_offset": [
143,
150
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 23,
"label": "dobj"
}
},
{
"text": "of",
"lemma": "of",
"index": 26,
"char_offset": [
151,
153
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 25,
"label": "prep"
}
},
{
"text": "preventing",
"lemma": "prevent",
"index": 27,
"char_offset": [
154,
164
],
"part_of_speech": {
"tag": "VBG",
"detail": "verb, gerund or present participle"
},
"dependency_parse": {
"head_index": 26,
"label": "pcomp"
}
},
{
"text": "and",
"lemma": "and",
"index": 28,
"char_offset": [
165,
168
],
"part_of_speech": {
"tag": "CC",
"detail": "conjunction, coordinating"
},
"dependency_parse": {
"head_index": 27,
"label": "cc"
}
},
{
"text": "relieving",
"lemma": "relieve",
"index": 29,
"char_offset": [
169,
178
],
"part_of_speech": {
"tag": "VBG",
"detail": "verb, gerund or present participle"
},
"dependency_parse": {
"head_index": 27,
"label": "conj"
}
},
{
"text": "suffering",
"lemma": "suffering",
"index": 30,
"char_offset": [
179,
188
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 29,
"label": "dobj"
}
},
{
"text": ",",
"lemma": ",",
"index": 31,
"char_offset": [
188,
189
],
"part_of_speech": {
"tag": ",",
"detail": "punctuation mark, comma"
},
"dependency_parse": {
"head_index": 27,
"label": "punct"
}
},
{
"text": "here",
"lemma": "here",
"index": 32,
"char_offset": [
190,
194
],
"part_of_speech": {
"tag": "RB",
"detail": "adverb"
},
"dependency_parse": {
"head_index": 27,
"label": "advmod"
}
},
{
"text": "at",
"lemma": "at",
"index": 33,
"char_offset": [
195,
197
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 32,
"label": "prep"
}
},
{
"text": "home",
"lemma": "home",
"index": 34,
"char_offset": [
198,
202
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 33,
"label": "pobj"
}
},
{
"text": "and",
"lemma": "and",
"index": 35,
"char_offset": [
203,
206
],
"part_of_speech": {
"tag": "CC",
"detail": "conjunction, coordinating"
},
"dependency_parse": {
"head_index": 33,
"label": "cc"
}
},
{
"text": "around",
"lemma": "around",
"index": 36,
"char_offset": [
207,
213
],
"part_of_speech": {
"tag": "IN",
"detail": "conjunction, subordinating or preposition"
},
"dependency_parse": {
"head_index": 33,
"label": "conj"
}
},
{
"text": "the",
"lemma": "the",
"index": 37,
"char_offset": [
214,
217
],
"part_of_speech": {
"tag": "DT",
"detail": "determiner"
},
"dependency_parse": {
"head_index": 38,
"label": "det"
}
},
{
"text": "world",
"lemma": "world",
"index": 38,
"char_offset": [
218,
223
],
"part_of_speech": {
"tag": "NN",
"detail": "noun, singular or mass"
},
"dependency_parse": {
"head_index": 36,
"label": "pobj"
}
},
{
"text": ".",
"lemma": ".",
"index": 39,
"char_offset": [
223,
224
],
"part_of_speech": {
"tag": ".",
"detail": "punctuation mark, sentence closer"
},
"dependency_parse": {
"head_index": 23,
"label": "punct"
}
}
]
}
],
"entities": [
{
"text": "American",
"label": "NORP",
"token_offset": [
1,
2
],
"char_offset": [
4,
12
]
}
],
"sentiment": 0.7974
}
},
"signature": {
"resource": "POST \/nlp\/parse",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
POST nlp/lid¶
Identify the language of some text input. Results are returned indicating an ISO 639-1 Code.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @nlp-lid-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/nlp/lid
The contents of nlp-lid-input.json
:
{
"input":[
"Hello world",
"Hola Mundo",
"こんにちは世界"
]
}
POST Response¶
{
"econtext": {
"nlp": {
"lid": [
"en",
"es",
"ja"
]
},
"signature": {
"resource": "POST \/nlp\/lid",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
Categories¶
Categories Calls
POST categories/categories¶
Retrieve a dictionary of Category objects and associated overlays given a list of IDs.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @categories_list.json https://api.econtext.com/v2/categories/categories
The contents of categories_list.json
POST Response¶
{
"econtext": {
"categories": {
"categories": {
"ac0fb32ea52f2c1228592ad6598c2cc2": {
"id": "ac0fb32ea52f2c1228592ad6598c2cc2",
"name": "Breaking Bad",
"path": [
"Arts & Entertainment",
"Movies & Television",
"Movie & TV Products",
"TV",
"Drama TV Shows",
"Breaking Bad"
],
"idpath": [
"0cc9e1516aaa38d4802a2ee5314ac4ab",
"06b7167107de9cff93e6738da9c044c4",
"8e4e953b861d4597cb5fae3b7de67ce5",
"b3728edb10af57dfbd941132f0c932ae",
"153fd544b9063cfdbe86aaf1b04882b4",
"ac0fb32ea52f2c1228592ad6598c2cc2"
],
"stats": {
"social_relevance": 4.32244e-5,
"social_idf": 9.8314479757,
"commercial_score": 0.3
},
"facets": [
[
"domain",
"product"
],
[
"brand",
"breaking bad"
]
]
}
},
"overlay": {
"ac0fb32ea52f2c1228592ad6598c2cc2": {
"IAB_v2_2020": [
[
[
647,
"Television::Drama TV"
]
]
]
}
}
},
"signature": {
"resource": "POST /categories/categories",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
GET categories/tiers¶
Retrieve the top tier Categories from the eContext Taxonomy. The categories returned from this call may be used to specify a branch of the taxonomy that you would like to limit mapping and search to.
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/categories/tiers
GET Response¶
{
"econtext": {
"categories": [
{
"id": "719105219f516cdbd3bc846a12df0b44",
"name": "Adult Content",
"path": [
"Adult Content"
],
"idpath": [
"719105219f516cdbd3bc846a12df0b44"
],
"stats": {
"social_idf": 296563.6,
"social_relevance": 0.0000027124
}
},
{
"id": "922b44e4080760bcd7f30f0a676d3dfd",
"name": "Apparel",
"path": [
"Apparel"
],
"idpath": [
"922b44e4080760bcd7f30f0a676d3dfd"
],
"stats": {
"social_idf": 15787.579033579,
"social_relevance": 0.0000509518
}
},
{
"id": "0cc9e1516aaa38d4802a2ee5314ac4ab",
"name": "Arts & Entertainment",
"path": [
"Arts & Entertainment"
],
"idpath": [
"0cc9e1516aaa38d4802a2ee5314ac4ab"
],
"stats": {
"social_idf": 2143.2770736046,
"social_relevance": 0.0003753161
}
},
{
"id": "6cfd0f39559d540094604e7eb3e54098",
"name": "Beauty",
"path": [
"Beauty"
],
"idpath": [
"6cfd0f39559d540094604e7eb3e54098"
],
"stats": {
"social_idf": 913.3248365394,
"social_relevance": 0.0008807451
}
},
{
"id": "3064c1a4cbbabd7f0ffd45cd40db97ed",
"name": "Books & Literature",
"path": [
"Books & Literature"
],
"idpath": [
"3064c1a4cbbabd7f0ffd45cd40db97ed"
],
"stats": {
"social_idf": 17636.444647759,
"social_relevance": 0.0000456105
}
},
{
"id": "246045a85ad09438156569ba21b02f5e",
"name": "Business & Industrial",
"path": [
"Business & Industrial"
],
"idpath": [
"246045a85ad09438156569ba21b02f5e"
],
"stats": {
"social_idf": 505.1528825996,
"social_relevance": 0.0015924017
}
},
{
"id": "f2300bfd81612ac3e8e5c154334057c5",
"name": "Computers & Electronics",
"path": [
"Computers & Electronics"
],
"idpath": [
"f2300bfd81612ac3e8e5c154334057c5"
],
"stats": {
"social_idf": 5407.1904628331,
"social_relevance": 0.000148766
}
},
{
"id": "27e0bc27298feede36140f281e0dee16",
"name": "Finance",
"path": [
"Finance"
],
"idpath": [
"27e0bc27298feede36140f281e0dee16"
],
"stats": {
"social_idf": 1640.1458351059,
"social_relevance": 0.0004904481
}
},
{
"id": "10fedce50b97f7006e71901bcdacc0fc",
"name": "Food & Drink",
"path": [
"Food & Drink"
],
"idpath": [
"10fedce50b97f7006e71901bcdacc0fc"
],
"stats": {
"social_idf": 2338.8296529969,
"social_relevance": 0.0003439354
}
},
{
"id": "132a2327ee287cd11be6d6fd6fb2f276",
"name": "Games & Toys",
"path": [
"Games & Toys"
],
"idpath": [
"132a2327ee287cd11be6d6fd6fb2f276"
],
"stats": {
"social_idf": 2772.4196749605,
"social_relevance": 0.0002901459
}
},
{
"id": "e205ca26092d0fdb0b7a49354a3fe318",
"name": "Government",
"path": [
"Government"
],
"idpath": [
"e205ca26092d0fdb0b7a49354a3fe318"
],
"stats": {
"social_idf": 1167.0077491222,
"social_relevance": 0.0006892896
}
},
{
"id": "65a41262de6b6fa72bebc5fb7b84d4dd",
"name": "Health",
"path": [
"Health"
],
"idpath": [
"65a41262de6b6fa72bebc5fb7b84d4dd"
],
"stats": {
"social_idf": 563.5454013916,
"social_relevance": 0.0014274029
}
},
{
"id": "04265b097615aa97178e3e06d933a31a",
"name": "Hobbies & Leisure",
"path": [
"Hobbies & Leisure"
],
"idpath": [
"04265b097615aa97178e3e06d933a31a"
],
"stats": {
"social_idf": 8730.3596014493,
"social_relevance": 0.000092139
}
},
{
"id": "0b1cfd1a5102a974a372e9bc3cfffb35",
"name": "Home & Garden",
"path": [
"Home & Garden"
],
"idpath": [
"0b1cfd1a5102a974a372e9bc3cfffb35"
],
"stats": {
"social_idf": 10614.886563877,
"social_relevance": 0.000075781
}
},
{
"id": "be42e02a03e419e7d31db6b54ef84913",
"name": "Jobs & Education",
"path": [
"Jobs & Education"
],
"idpath": [
"be42e02a03e419e7d31db6b54ef84913"
],
"stats": {
"social_idf": 917934.95238095,
"social_relevance": 0.000001
}
},
{
"id": "9449388ba0686b2b73d88f6801ae43d3",
"name": "Law & Legal",
"path": [
"Law & Legal"
],
"idpath": [
"9449388ba0686b2b73d88f6801ae43d3"
],
"stats": {
"social_idf": 2320.5289514867,
"social_relevance": 0.0003466478
}
},
{
"id": "bcfb236bcfc3b0f4f03a3cfeed7253a7",
"name": "People & Society",
"path": [
"People & Society"
],
"idpath": [
"bcfb236bcfc3b0f4f03a3cfeed7253a7"
],
"stats": {
"social_idf": 2780.8185227928,
"social_relevance": 0.0002892696
}
},
{
"id": "0bd59f073e8d6969764d60d60c8e472a",
"name": "Pets & Animals",
"path": [
"Pets & Animals"
],
"idpath": [
"0bd59f073e8d6969764d60d60c8e472a"
],
"stats": {
"social_idf": 154213.072,
"social_relevance": 0.0000052162
}
},
{
"id": "1a25b3de350ce8b90adf2488940ac282",
"name": "Real Estate",
"path": [
"Real Estate"
],
"idpath": [
"1a25b3de350ce8b90adf2488940ac282"
],
"stats": {
"social_idf": 2770.825643237,
"social_relevance": 0.0002903129
}
},
{
"id": "97a2cc1e4f6df353e6eab12cfe9782ef",
"name": "Sciences & Humanities",
"path": [
"Sciences & Humanities"
],
"idpath": [
"97a2cc1e4f6df353e6eab12cfe9782ef"
],
"stats": {
"social_idf": 481915.85,
"social_relevance": 0.0000016692
}
},
{
"id": "62d92a4437331aae79cd0181b8e3e48d",
"name": "Shopping",
"path": [
"Shopping"
],
"idpath": [
"62d92a4437331aae79cd0181b8e3e48d"
],
"stats": {
"social_idf": null,
"social_relevance": null
}
},
{
"id": "b00fac5f30dc8dbb660c8d08fe66f487",
"name": "Sports",
"path": [
"Sports"
],
"idpath": [
"b00fac5f30dc8dbb660c8d08fe66f487"
],
"stats": {
"social_idf": 976.9719730374,
"social_relevance": 0.0008233668
}
},
{
"id": "71d23bae99aff67ee839c60c0c8ba179",
"name": "Travel",
"path": [
"Travel"
],
"idpath": [
"71d23bae99aff67ee839c60c0c8ba179"
],
"stats": {
"social_idf": 777.0329732344,
"social_relevance": 0.001035228
}
},
{
"id": "8e80758bbe284a4a02ffaad4636f21b2",
"name": "Vehicles",
"path": [
"Vehicles"
],
"idpath": [
"8e80758bbe284a4a02ffaad4636f21b2"
],
"stats": {
"social_idf": 3559.8585410896,
"social_relevance": 0.0002259658
}
},
{
"id": "dec756dcf0caf002c0b704a1717e1d63",
"name": "Weapons",
"path": [
"Weapons"
],
"idpath": [
"dec756dcf0caf002c0b704a1717e1d63"
],
"stats": {
"social_idf": 4606.1252090801,
"social_relevance": 0.0001746384
}
}
],
"signature": {
"resource": "GET /categories/tiers",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
GET categories/map/:keyword¶
Use the eContext Taxonomy to return a single best matching Category for the keyword submitted.
Parameters¶
Parameter | Type | Description |
---|---|---|
keyword (required) | string | The keyword to provide a best match Category for. This should be URL encoded.
|
branches (optional) | string | A comma-separated list of category/tier ids used to limit classification results.
|
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/categories/map/breaking+bad+tshirt?branches=922b44e4080760bcd7f30f0a676d3dfd
GET Response¶
{
"econtext": {
"categories": [
{
"id": "99d39893587ca299b70c4e9cd725c383",
"name": "T-Shirts",
"path": [
"Apparel",
"Clothing",
"Shirts & Tops",
"Shirts & Tops [No Demographic Specified]",
"Casual Shirts & Tops",
"T-Shirts"
],
"idpath": [
"922b44e4080760bcd7f30f0a676d3dfd",
"3f58d0f311043889059146c7dc765bd3",
"8f0ea90fa739b596619a75cbfd50ba47",
"0dac4f87992e3197f964a30aa670dd76",
"13d1828fbb80571690be3ef2c7971a7b",
"99d39893587ca299b70c4e9cd725c383"
],
"stats": {
"social_relevance": 0.0005984496,
"social_idf": 1349.3014255217
}
}
],
"signature": {
"resource": "GET /categories/map/:keyword",
"status": "200 OK - successful",
"client_ip": "54.243.176.220"
}
}
}
GET categories/search/:keyword¶
Sometimes you might want to retrieve a set of possible Categories from the provided keyword rather than mapping against the rules of the eContext Taxonomy. This method of matching uses a set of over 600,000,000 pre-classified keywords to identify probable Category matches for the particular keyword you are interested in, and includes a confidence score for each category.
Parameters¶
Parameter | Type | Description |
---|---|---|
keyword (required) | string | The keyword to match against the eContext Keyword Dataset for possible categorization. This value should be URL encoded.
|
limit (optional) | integer | The number of Category objects to return in the result set. The max number of Categories is
|
branches (optional) | string | A comma-separated list of category/tier ids used to limit classification results.
|
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/categories/search/chicago+hotels?limit=3
GET Response¶
{
"econtext": {
"categories": [
{
"id": "218f5840b5c92395b3654a92035016fd",
"name": "Hotels in Chicago, Illinois",
"path": [
"Travel",
"Travel Accommodations",
"Hotels & Motels",
"North America Hotels",
"Hotels in the US",
"Hotels in Illinois",
"Hotels in Chicago, Illinois"
],
"idpath": [
"71d23bae99aff67ee839c60c0c8ba179",
"c41e1ed41cebef0eb241fd192c0e604e",
"c915f112a5632b280c894e262828c981",
"8aa4ecfd7cd7a17dcab56a9a37f610fd",
"435b6bdfab0bf365e5e6887a1b7b3171",
"06702a0bf4ff694903c44455487c3e1b",
"218f5840b5c92395b3654a92035016fd"
],
"stats": {
"social_idf": 713949.40740741,
"social_relevance": 0.0000011267
},
"confidence": 0.87356944379033
},
{
"id": "c915f112a5632b280c894e262828c981",
"name": "Hotels & Motels",
"path": [
"Travel",
"Travel Accommodations",
"Hotels & Motels"
],
"idpath": [
"71d23bae99aff67ee839c60c0c8ba179",
"c41e1ed41cebef0eb241fd192c0e604e",
"c915f112a5632b280c894e262828c981"
],
"stats": {
"social_idf": 1752.8993361826,
"social_relevance": 0.0004589005
},
"confidence": 0.032166909998587
},
{
"id": "ccae5eac4fd6066ca54b80e2d7538904",
"name": "Hotel Discounts",
"path": [
"Travel",
"Travel Accommodations",
"Hotels & Motels",
"Hotels & Motels [No Location Specified]",
"Hotels & Motels [No Feature Specified]",
"Hotel Rates",
"Hotel Deals",
"Hotel Discounts"
],
"idpath": [
"71d23bae99aff67ee839c60c0c8ba179",
"c41e1ed41cebef0eb241fd192c0e604e",
"c915f112a5632b280c894e262828c981",
"9ed0129c3d0fe8e16471e4e2af8e7200",
"a6a8e75c2d32b800bbf7616d802fb4c8",
"417588c97968aa8aac068f636824479c",
"c46743267fe34858a80f2bd11dffe25a",
"ccae5eac4fd6066ca54b80e2d7538904"
],
"stats": {
"social_idf": 92232.698564593,
"social_relevance": 0.0000087215
},
"confidence": 0.020746008571563
}
],
"signature": {
"resource": "GET /categories/search/:keyword",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
Content Classification¶
The eContext API provides classification services for several different types of content.
Classify HTML¶
Classify HTML Calls
POST classify/html¶
Classify the submitted HTML and return scored categories and keywords.
Parameters¶
Parameter | Type | Description |
---|---|---|
html (required) | string | HTML content to be classified. |
classification_type (optional) | integer | Select the classification method: 1 for rule-based, 2 for model-based, or 0 for a hybrid rule-based + model-based (defaults to 0 ) |
ml_threshold (optional) | float | Specify a confidence threshold for accepting an ML prediction. A lower value increases recall at the expense of precision (defaults to 0.75 ) |
entities (optional) | boolean | Perform Named Entity Recognition (NER) on the content submitted (defaults to false ) |
sentiment (optional) | boolean | Perform sentiment analysis on the content submitted (defaults to false ) |
taxonomy_timestamp (optional) | integer | A Unix timestamp instructing the classifier to use categories from the eContext Taxonomy that existed at this point in time. This will allow recently deleted categories to remain and hides newly created categories |
dataset_id (optional) | string | A Custom Taxonomies id to use in lieu of the default eContext Taxonomy |
add_last_node (optional) | bool | Include the last category node, or leave at the parent category |
classify_limit (optional) | integer | Limit the number of categories that may be returned per post |
classify_timeout (optional) | float | The number of seconds to spend on a classification task |
Return¶
The result set includes scored_categories
and scored_keywords
as well as a categories
dictionary. The
scored_keywords
object contains a list of high-value phrases that eContext was able to pull out of the submitted text
as well as associated scores for each. The scored_categories
object contains a list of category_id
and score
objects where the category_id
corresponds to an item in the categories
dictionary. Higher values indicate a higher
score.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @classify-html-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/classify/html
The contents of classify-html-input.json
:
{
"html": "<!DOCTYPE html><html><head><title>Microsoft Stores offer $100 Xbox One discount
if you trade in a PS3</title></head><body><h1>Microsoft Stores offer $100 Xbox One discount
if you trade in a PS3</h1><p>Currently there’s one advantage the PS4 has over the Xbox One
that Microsoft can do little about: the price difference.</p><p>Sure, they
could cut the price of the Xbox One by $100 and match the PS4 at $399, but then Microsoft
would be making a big loss on every console sold. However, they have come up with a way to
offer you an Xbox One for $399.</p><p>From now until March 2, Microsoft Stores will offer
you $100 of store credit if you trade in a PS3, Xbox 360 S, or Xbox 360 E. Of course,
there’s a number of terms and conditions in order to get that $100. The console must be in
fully working order and have its original accessories including the power supply. You will
also only be guaranteed to get $100 for your old machine if you agree to purchase an Xbox
One at the same time.</p></body></html>"
}
POST Response¶
{
"econtext": {
"classify": {
"title": "Microsoft Stores offer $100 Xbox One discount if you trade in a PS3",
"scored_categories": [
{
"category_id": "f84fecd03747f686a400004a0c0c131f",
"score": 0.2287166454892
},
{
"category_id": "38ad1efe89be1d7422cfce5636156cad",
"score": 0.16518424396442
},
{
"category_id": "269e2e578e59d5730412dd0e1137bfd4",
"score": 0.1143583227446
},
{
"category_id": "7c11e7aa595539b4801d8e7621c20840",
"score": 0.1143583227446
},
{
"category_id": "fd84446c4932d31e5f447e94d7f2da8f",
"score": 0.09148665819568
},
{
"category_id": "367f5ea7ca1e5c3ff10b077d9a65eb42",
"score": 0.082592121982211
},
{
"category_id": "fb842bf3a7941336e6add468d3906ff4",
"score": 0.050825921219822
}
],
"scored_keywords": [
{
"keyword": "microsoft stores",
"score": 0.2287166454892
},
{
"keyword": "xbox one",
"score": 0.16518424396442
},
{
"keyword": "microsoft",
"score": 0.1143583227446
},
{
"keyword": "ps3",
"score": 0.1143583227446
},
{
"keyword": "discount",
"score": 0.09148665819568
},
{
"keyword": "xbox",
"score": 0.082592121982211
},
{
"keyword": "ps4",
"score": 0.050825921219822
}
],
"categories": {
"f84fecd03747f686a400004a0c0c131f": {
"id": "f84fecd03747f686a400004a0c0c131f",
"name": "Microsoft Stores",
"path": [
"Computers \u0026 Electronics",
"General Electronics",
"General Electronics Retailers [List]",
"Microsoft Stores"
],
"idpath": [
"bdc03d860e5f33c08146faa43487c1bd",
"5d246a5262680d7e5ab8239a56425730",
"adf37548583dd2d1266e915980c09f1f",
"f84fecd03747f686a400004a0c0c131f"
],
"stats": {
"social_relevance": 2.1834e-6,
"social_idf": 12.8158720241
},
"facets": []
},
"269e2e578e59d5730412dd0e1137bfd4": {
"id": "269e2e578e59d5730412dd0e1137bfd4",
"name": "Microsoft",
"path": [
"Computers \u0026 Electronics",
"Technology Companies",
"Microsoft"
],
"idpath": [
"bdc03d860e5f33c08146faa43487c1bd",
"45d78f5a0c2e0b188bb3931288ca0074",
"269e2e578e59d5730412dd0e1137bfd4"
],
"stats": {
"social_relevance": 9.00323e-5,
"social_idf": 9.0965774811
},
"facets": [
[
"brand",
"microsoft"
]
]
},
"38ad1efe89be1d7422cfce5636156cad": {
"id": "38ad1efe89be1d7422cfce5636156cad",
"name": "Xbox One",
"path": [
"Games \u0026 Toys",
"Video Games",
"Video Game Products",
"Video Game Electronics",
"Video Game Systems",
"Microsoft Game Systems",
"Xbox One"
],
"idpath": [
"798f51fd6b8d172fa4fd718313c8c4c6",
"761a66aa4f58df6fdc5151837e392ffa",
"e85b2a2795db3616a2e4efe77e9763d3",
"fb6e05a0a6cb6e6e12f984484a95c8bd",
"281afc76dd2aba143e93fbda5b12cd43",
"3b372c9f4b17d9bf3daaa696d88bd2cb",
"38ad1efe89be1d7422cfce5636156cad"
],
"stats": {
"social_relevance": 8.08493e-5,
"social_idf": 9.2041595147
},
"facets": [
[
"domain",
"product"
],
[
"brand",
"microsoft"
],
[
"product line",
"xbox one"
]
]
},
"367f5ea7ca1e5c3ff10b077d9a65eb42": {
"id": "367f5ea7ca1e5c3ff10b077d9a65eb42",
"name": "Xbox",
"path": [
"Games \u0026 Toys",
"Video Games",
"Video Game Products",
"Video Game Electronics",
"Video Game Systems",
"Microsoft Game Systems",
"Xbox"
],
"idpath": [
"798f51fd6b8d172fa4fd718313c8c4c6",
"761a66aa4f58df6fdc5151837e392ffa",
"e85b2a2795db3616a2e4efe77e9763d3",
"fb6e05a0a6cb6e6e12f984484a95c8bd",
"281afc76dd2aba143e93fbda5b12cd43",
"3b372c9f4b17d9bf3daaa696d88bd2cb",
"367f5ea7ca1e5c3ff10b077d9a65eb42"
],
"stats": {
"social_relevance": 0.0001794867,
"social_idf": 8.4066451632
},
"facets": [
[
"product line",
"xbox"
],
[
"domain",
"product"
],
[
"brand",
"microsoft"
]
]
},
"fd84446c4932d31e5f447e94d7f2da8f": {
"id": "fd84446c4932d31e5f447e94d7f2da8f",
"name": "Discounts",
"path": [
"Shopping",
"Shopping Resources",
"Coupon Websites \u0026 Services",
"Coupon Services",
"Coupons \u0026 Promotional Discounts",
"Discounts"
],
"idpath": [
"b5993a12bb630473aa1f4f7c924f5cb9",
"72c561d57874e3163e70f8876b4b88b9",
"8d82bfef852c143f2caa363514ece6ec",
"e06400364dee27e6d8ade510564f8f27",
"987101e47b003440c98a48eb750145ad",
"fd84446c4932d31e5f447e94d7f2da8f"
],
"stats": {
"social_relevance": 0.0001633682,
"social_idf": 8.5007396243
},
"facets": [
[
"domain",
"service"
]
]
},
"7c11e7aa595539b4801d8e7621c20840": {
"id": "7c11e7aa595539b4801d8e7621c20840",
"name": "PlayStation 3",
"path": [
"Games \u0026 Toys",
"Video Games",
"Video Game Products",
"Video Game Electronics",
"Video Game Systems",
"Sony Game Systems",
"PlayStation",
"PlayStation 3"
],
"idpath": [
"798f51fd6b8d172fa4fd718313c8c4c6",
"761a66aa4f58df6fdc5151837e392ffa",
"e85b2a2795db3616a2e4efe77e9763d3",
"fb6e05a0a6cb6e6e12f984484a95c8bd",
"281afc76dd2aba143e93fbda5b12cd43",
"fc2ef8f2df41f297e63aa06a1992132b",
"c83189555c0bcf05939ae6b5ad3ac17c",
"7c11e7aa595539b4801d8e7621c20840"
],
"stats": {
"social_relevance": 1.25865e-5,
"social_idf": 11.0641178895
},
"facets": [
[
"domain",
"product"
],
[
"brand",
"sony"
],
[
"product line",
"playstation 3"
]
]
},
"fb842bf3a7941336e6add468d3906ff4": {
"id": "fb842bf3a7941336e6add468d3906ff4",
"name": "PlayStation 4",
"path": [
"Games \u0026 Toys",
"Video Games",
"Video Game Products",
"Video Game Electronics",
"Video Game Systems",
"Sony Game Systems",
"PlayStation",
"PlayStation 4"
],
"idpath": [
"798f51fd6b8d172fa4fd718313c8c4c6",
"761a66aa4f58df6fdc5151837e392ffa",
"e85b2a2795db3616a2e4efe77e9763d3",
"fb6e05a0a6cb6e6e12f984484a95c8bd",
"281afc76dd2aba143e93fbda5b12cd43",
"fc2ef8f2df41f297e63aa06a1992132b",
"c83189555c0bcf05939ae6b5ad3ac17c",
"fb842bf3a7941336e6add468d3906ff4"
],
"stats": {
"social_relevance": 0.0005111679,
"social_idf": 7.3600482699
},
"facets": [
[
"domain",
"product"
],
[
"product line",
"playstation 4"
],
[
"brand",
"sony"
]
]
},
"b92b6f1c-26e1-579c-b2ab-c8d78fa820c7": {
"id": "b92b6f1c-26e1-579c-b2ab-c8d78fa820c7",
"name": "Microsoft",
"path": [
"Organizations",
"Microsoft"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"b92b6f1c-26e1-579c-b2ab-c8d78fa820c7"
],
"stats": null,
"facets": null
}
},
"entities": [
{
"category_id": "f84fecd03747f686a400004a0c0c131f",
"type": "ORG"
},
{
"category_id": "7c11e7aa595539b4801d8e7621c20840",
"type": "PRODUCT"
},
{
"category_id": "f84fecd03747f686a400004a0c0c131f",
"type": "ORG"
},
{
"category_id": "7c11e7aa595539b4801d8e7621c20840",
"type": "PRODUCT"
},
{
"category_id": "f84fecd03747f686a400004a0c0c131f",
"type": "ORG"
},
{
"category_id": "b92b6f1c-26e1-579c-b2ab-c8d78fa820c7",
"type": "ORG"
}
],
"sentiment": 0.6422,
"chars": 326,
"overlay": {
"f84fecd03747f686a400004a0c0c131f": {
"IAB_v2.0_2018": [
[
[
"632",
"Technology \u0026 Computing::Consumer Electronics"
],
[
"596",
"Technology \u0026 Computing"
]
]
]
},
"269e2e578e59d5730412dd0e1137bfd4": {
"IAB_v2.0_2018": [
[
[
"632",
"Technology \u0026 Computing::Consumer Electronics"
],
[
"596",
"Technology \u0026 Computing"
]
]
]
},
"38ad1efe89be1d7422cfce5636156cad": {
"IAB_v2.0_2018": [
[
[
"239",
"Hobbies \u0026 Interests"
],
[
"269",
"Hobbies \u0026 Interests::Games and Puzzles"
]
],
[
[
"680",
"Video Gaming"
]
],
[
[
"681",
"Video Gaming::Console Games"
]
]
]
},
"367f5ea7ca1e5c3ff10b077d9a65eb42": {
"IAB_v2.0_2018": [
[
[
"239",
"Hobbies \u0026 Interests"
],
[
"269",
"Hobbies \u0026 Interests::Games and Puzzles"
]
],
[
[
"680",
"Video Gaming"
]
],
[
[
"681",
"Video Gaming::Console Games"
]
]
]
},
"fd84446c4932d31e5f447e94d7f2da8f": {
"IAB_v2.0_2018": [
[
[
"473",
"Shopping"
]
],
[
[
"474",
"Shopping::Coupons and Discounts"
]
]
]
},
"7c11e7aa595539b4801d8e7621c20840": {
"IAB_v2.0_2018": [
[
[
"239",
"Hobbies \u0026 Interests"
],
[
"269",
"Hobbies \u0026 Interests::Games and Puzzles"
]
],
[
[
"680",
"Video Gaming"
]
],
[
[
"681",
"Video Gaming::Console Games"
]
]
]
},
"fb842bf3a7941336e6add468d3906ff4": {
"IAB_v2.0_2018": [
[
[
"239",
"Hobbies \u0026 Interests"
],
[
"269",
"Hobbies \u0026 Interests::Games and Puzzles"
]
],
[
[
"680",
"Video Gaming"
]
],
[
[
"681",
"Video Gaming::Console Games"
]
]
]
},
"b92b6f1c-26e1-579c-b2ab-c8d78fa820c7": {
"IAB_v2.0_2018": []
}
}
},
"signature": {
"resource": "POST \/classify\/:type\/:result_id",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
Classify Keywords¶
Classify Keywords Calls
POST classify/keywords¶
Classify a list of keywords and return mapped eContext categories.
There is a hard limit of 1,000 keywords per call.
Parameters¶
Parameter | Type | Description |
---|---|---|
keywords (required) | array | A list of keyword strings to process (no more than 1,000). |
classification_type (optional) | integer | Select the classification method: 1 for rule-based, 2 for model-based, or 0 for a hybrid rule-based + model-based (defaults to 0 ) |
ml_threshold (optional) | float | Specify a confidence threshold for accepting an ML prediction. A lower value increases recall at the expense of precision (defaults to 0.75 ) |
flags (optional) | boolean | Provide Object Flags to help filter out certain content categories including adult, firearms, gambling, etc (defaults to false ) |
branches (optional) | array | A set of eContext category ids. Any classification outside the section/s of the hierarchy described by this set will be removed from the response. |
entities (optional) | boolean | Perform Named Entity Recognition (NER) on the content submitted (defaults to false ) |
taxonomy_timestamp (optional) | integer | A Unix timestamp instructing the classifier to use categories from the eContext Taxonomy that existed at this point in time. This will allow recently deleted categories to remain and hides newly created categories |
dataset_id (optional) | string | A Custom Taxonomies id to use in lieu of the default eContext Taxonomy |
add_last_node (optional) | bool | Include the last category node, or leave at the parent category |
classify_limit (optional) | integer | Limit the number of categories that may be returned per post |
classify_timeout (optional) | float | The number of seconds to spend on a classification task |
Return¶
The result set includes a results
key which provides a list of category id
keys and associated data including Object Flags, if requested and found.
The results in this set are in the same order as the keyword list submitted in
the POST call.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @classify-keywords-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/classify/keywords
The contents of classify-keywords-input.json
:
{
"keywords": [
"chicago cubs win world series",
"chicago bears",
"chicago museums"
]
}
POST Response¶
{
"econtext": {
"classify": {
"results": [
{
"flags": [],
"category_id": "f807a71b4e0687cdaeb24afaaa725781"
},
{
"flags": [],
"category_id": "85edc49558d9373a4a5bcfc6eb0bac90"
},
{
"flags": [],
"category_id": "ab4a592bf3b0724f7955734270df0044"
}
],
"mappings": [
"f807a71b4e0687cdaeb24afaaa725781",
"85edc49558d9373a4a5bcfc6eb0bac90",
"ab4a592bf3b0724f7955734270df0044"
],
"categories": {
"85edc49558d9373a4a5bcfc6eb0bac90": {
"id": "85edc49558d9373a4a5bcfc6eb0bac90",
"name": "Chicago Bears",
"path": [
"Sports",
"Team Sports",
"Football",
"Football Leagues & Teams",
"Professional Football Leagues & Teams",
"NFL",
"National Football Conference",
"National Football Conference - North Division",
"Chicago Bears"
],
"idpath": [
"b00fac5f30dc8dbb660c8d08fe66f487",
"97e2d582fd4e9fe6c9ca51128222e55f",
"1d86d6fea65150be10232959abc02574",
"9398300d477069715ad4682b293fb087",
"04455c6d36d1056a7be0b231e861c0c5",
"f3fafece413cb4e87975d12457ddb9a1",
"4f2d7f778d65a60d35cc53fff475e84f",
"7680bb6c2b3e6babe7bfcc7c44fd752b",
"85edc49558d9373a4a5bcfc6eb0bac90"
],
"stats": {
"social_relevance": 0.0000145741,
"social_idf": 10.89641527996
}
},
"ab4a592bf3b0724f7955734270df0044": {
"id": "ab4a592bf3b0724f7955734270df0044",
"name": "Museums",
"path": [
"Travel",
"Sightseeing Tours & Tourist Attractions",
"Tourist Attractions",
"Arts & Culture Attractions",
"Museums"
],
"idpath": [
"71d23bae99aff67ee839c60c0c8ba179",
"464464e0888a968cc968fa732e173502",
"38d7f7961dc84f1c28b49c9c0f7864c6",
"37a81c7685508c8ea16cafeebc81eab3",
"ab4a592bf3b0724f7955734270df0044"
],
"stats": {
"social_relevance": 0.0001311244,
"social_idf": 8.6995146942028
}
},
"f807a71b4e0687cdaeb24afaaa725781": {
"id": "f807a71b4e0687cdaeb24afaaa725781",
"name": "Chicago Cubs",
"path": [
"Sports",
"Team Sports",
"Baseball & Softball",
"Baseball & Softball Leagues & Teams",
"Baseball Leagues & Teams",
"MLB",
"National League",
"National League Central",
"Chicago Cubs"
],
"idpath": [
"b00fac5f30dc8dbb660c8d08fe66f487",
"97e2d582fd4e9fe6c9ca51128222e55f",
"c7ba1574765e1e52284f7c741eda8cb2",
"0e549b37faa378d09c7eb2933c58d5d0",
"eb4500849649483fe92110c60fa23305",
"1e230ea842e7351f0b56386a9c91580c",
"395270339c7febd83b22fa70c92d0461",
"67f178964c2e14f125cb6677ab3f7fe7",
"f807a71b4e0687cdaeb24afaaa725781"
],
"stats": {
"social_relevance": 0.0000496709,
"social_idf": 9.6702417656539
}
}
},
"overlay": []
},
"signature": {
"resource": "GET /classify/:type/:result_id",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
Classify Social¶
Classify Social Calls
POST classify/social¶
Classify a list of social posts and return scored categories and keywords.
There is a hard limit of 1,000 posts per call.
Parameters¶
Parameter | Type | Description |
---|---|---|
social (required) | array | A list (no more than 1,000 items) of strings. |
classification_type (optional) | integer | Select the classification method: 1 for rule-based, 2 for model-based, or 0 for a hybrid rule-based + model-based (defaults to 1 ) |
ml_threshold (optional) | float | Specify a confidence threshold for accepting an ML prediction. A lower value increases recall at the expense of precision (defaults to 0.75 ) |
flags (optional) | boolean | Provide Object Flags to help filter out certain content categories including adult, firearms, gambling, etc (defaults to false ) |
entities (optional) | boolean | Perform Named Entity Recognition (NER) on the content submitted (defaults to false ) |
sentiment (optional) | boolean | Perform sentiment analysis on the content submitted (defaults to false ) |
taxonomy_timestamp (optional) | integer | A Unix timestamp instructing the classifier to use categories from the eContext Taxonomy that existed at this point in time. This will allow recently deleted categories to remain and hides newly created categories |
dataset_id (optional) | string | A Custom Taxonomies id to use in lieu of the default eContext Taxonomy |
add_last_node (optional) | bool | Include the last category node, or leave at the parent category |
classify_limit (optional) | integer | Limit the number of categories that may be returned per post |
classify_timeout (optional) | float | The number of seconds to spend on a classification task |
Return¶
The result set includes scored_categories
and scored_keywords
as well as a categories
dictionary. The
scored_keywords
object contains a list of high-value phrases that eContext was able to pull out of the submitted
text as well as associated scores for each. The scored_categories
object contains a list of category_id
and
score
objects where the category_id
corresponds to an item in the categories
dictionary. Higher values
indicate a higher score.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @classify-social-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/classify/social
The contents of classify-social-input.json
:
{
"entities":true,
"flags":true,
"sentiment":true,
"social":[
"HAPPY PI DAY 3.141592653589793238462643383279502884197169399375...",
"Happy birthday, MIT! The Institute was founded April 10, 1861 by William Barton Rogers. #tbt",
"Consciousness is a state of matter",
"Flying car by @MITAeroAstro spinoff @Terrafugia moves from science fiction to reality",
"Amazing Time-Lapse Video Shows Evolution of #Universe Like Never Before",
"MIT alum @JeopardyJulia now trails only @kenjennings for all-time #Jeopardy! wins",
"Happy b-day Nikola #Tesla! Startup @WiTricity is bringing his ideas on wireless power to life",
"Seen at the Student Center this afternoon: Tetris hash browns!",
"Researchers at @eapsMIT say a large earthquake may occur 5 miles from Istanbul",
"MIT's robotic cheetah can now run and jump untethered",
"Spacesuit from @MITAeroAstro shrink-wraps to astronauts' bodies",
"This social post should be flagged for fireworks and gambling references"
]
}
POST Response¶
{
"econtext": {
"classify": {
"results": [
{
"scored_categories": [
{
"category_id": "392e0d5873231ed423359e4ac5b8d27c",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "pi day",
"score": 1
}
],
"flags": [],
"entities": [],
"sentiment": 0.7257
},
{
"scored_categories": [
{
"category_id": "e1a54dc1ecf8e9e2e08505f237fb5968",
"score": 0.5
},
{
"category_id": "351fce59b166d4c9bd4f7e2714a63a44",
"score": 0.5
}
],
"scored_keywords": [
{
"keyword": "birthday",
"score": 0.5
},
{
"keyword": "tbt",
"score": 0.5
}
],
"flags": [],
"entities": [
{
"category_id": "d43dd02c-697b-54be-ac60-a93d6ae39f18",
"type": "ORG"
},
{
"category_id": "99eb4ac4-974f-5805-b729-ef7a2b944c4d",
"type": "ORG"
},
{
"category_id": "d68982ca-a1f0-5c73-a435-6b7f427f0a9c",
"type": "PERSON"
}
],
"sentiment": 0.9129
},
{
"scored_categories": [],
"scored_keywords": [],
"flags": [],
"entities": [
{
"category_id": "723d7837-7b3d-5814-801c-eec10bfa0ef2",
"type": "ORG"
}
],
"sentiment": 0.5637
},
{
"scored_categories": [
{
"category_id": "e77926f4edd0802c8ccae902ca3ab481",
"score": 0.5
},
{
"category_id": "f92c6cc9611ee197c2b747583ae27bb7",
"score": 0.5
}
],
"scored_keywords": [
{
"keyword": "flying car",
"score": 0.5
},
{
"keyword": "science fiction",
"score": 0.5
}
],
"flags": [],
"entities": [
{
"category_id": "5ac57804-0e72-5fe5-a302-8f3b483d4e30",
"type": "ORG"
}
],
"sentiment": 0.5339
},
{
"scored_categories": [
{
"category_id": "c3c123ab122a63e915c59bfb4452f963",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "time-lapse video",
"score": 1
}
],
"flags": [],
"entities": [
{
"category_id": "34458de6-1faf-51a7-8faa-d7b400443fbd",
"type": "ORG"
}
],
"sentiment": 0.8255
},
{
"scored_categories": [
{
"category_id": "167552b27327fc95f4dd5ad057660454",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "@kenjennings",
"score": 1
}
],
"flags": [],
"entities": [
{
"category_id": "d43dd02c-697b-54be-ac60-a93d6ae39f18",
"type": "ORG"
},
{
"category_id": "54b598f0-8b19-5311-8acb-d18bd079fdcc",
"type": "PRODUCT"
}
],
"sentiment": 0.7818
},
{
"scored_categories": [
{
"category_id": "351fce59b166d4c9bd4f7e2714a63a44",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "b-day",
"score": 1
}
],
"flags": [],
"entities": [
{
"category_id": "100190ae-3bd4-5c47-bce2-4b314a4bc784",
"type": "ORG"
},
{
"category_id": "6cf60af7-cc35-5cb0-9096-0b572f746fd1",
"type": "PERSON"
}
],
"sentiment": 0.8256
},
{
"scored_categories": [
{
"category_id": "b675e7ef766cdf32e0cd88dc126d1298",
"score": 0.33333333333333
},
{
"category_id": "6c40a85c0e21602bd49dac13495c442a",
"score": 0.33333333333333
},
{
"category_id": "beb03942afeb6c7819a1ebd803b17246",
"score": 0.33333333333333
}
],
"scored_keywords": [
{
"keyword": "student",
"score": 0.33333333333333
},
{
"keyword": "tetris",
"score": 0.33333333333333
},
{
"keyword": "hash browns",
"score": 0.33333333333333
}
],
"flags": [],
"entities": [
{
"category_id": "3bbb442f-3415-53a4-bac2-7d05718c2029",
"type": "FAC"
},
{
"category_id": "6c40a85c0e21602bd49dac13495c442a",
"type": "GPE"
}
],
"sentiment": 0.6415
},
{
"scored_categories": [
{
"category_id": "416f528d257c527be78186310f94d849",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "large earthquake",
"score": 1
}
],
"flags": [],
"entities": [
{
"category_id": "14aa8718-b2c3-5289-a36c-97ef96951219",
"type": "ORG"
},
{
"category_id": "8c4decd2-a521-5b78-b832-b612a18c693d",
"type": "GPE"
}
],
"sentiment": 0.4232
},
{
"scored_categories": [
{
"category_id": "f49381198e13b2bb011acabb7aff46ea",
"score": 1
}
],
"scored_keywords": [
{
"keyword": "robotic",
"score": 1
}
],
"flags": [],
"entities": [
{
"category_id": "1f3c312f-04bb-5c64-8163-86b93eff1fc5",
"type": "ORG"
}
],
"sentiment": 0.9021
},
{
"scored_categories": [
{
"category_id": "41ed5d3e1d4025ff4c948a4522995797",
"score": 0.33333333333333
},
{
"category_id": "a9a0477ed754171d68bc94058b3f9a40",
"score": 0.33333333333333
},
{
"category_id": "377821e5967fbda300d6bd59cca3aa01",
"score": 0.33333333333333
}
],
"scored_keywords": [
{
"keyword": "spacesuit",
"score": 0.33333333333333
},
{
"keyword": "shrink-wraps",
"score": 0.33333333333333
},
{
"keyword": "astronauts",
"score": 0.33333333333333
}
],
"flags": [],
"entities": [],
"sentiment": 0.5811
},
{
"scored_categories": [
{
"category_id": "cc293f9a2ec42c5438ee90751be03b94",
"score": 0.5
},
{
"category_id": "7705bcc505f80038f272c7de24a8e6a1",
"score": 0.5
}
],
"scored_keywords": [
{
"keyword": "fireworks",
"score": 0.5
},
{
"keyword": "gambling",
"score": 0.5
}
],
"flags": [
{
"flag_id": 32,
"priority": 1,
"listname": [
"banned",
"content"
]
},
{
"flag_id": 32,
"priority": 1,
"listname": [
"banned",
"content"
]
},
{
"flag_id": 16,
"priority": 1,
"listname": [
"banned",
"content"
]
}
],
"entities": [],
"sentiment": 0.159
}
],
"categories": {
"392e0d5873231ed423359e4ac5b8d27c": {
"id": "392e0d5873231ed423359e4ac5b8d27c",
"name": "Pi Day",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Formal Sciences",
"Mathematics",
"Principles of Mathematics",
"Numbers \u0026 Numeration Systems",
"Mathematical Constants",
"Pi",
"Pi Day"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"53d4c0d1fbbd7ace2bdabd3264a46780",
"4ce53ea2a04fa3630d9c6f7599836f61",
"0ab4242bf063fa7ffe5000496ca39e03",
"5eece07c994aac582de59a2549fac7aa",
"ed7c6e73c81e81c9793622b95ad63a2f",
"94a5ef1f4eb4fe9dd575adb525961b36",
"392e0d5873231ed423359e4ac5b8d27c"
],
"stats": {
"social_relevance": 5.908e-6,
"social_idf": 11.8204439717
},
"facets": []
},
"351fce59b166d4c9bd4f7e2714a63a44": {
"id": "351fce59b166d4c9bd4f7e2714a63a44",
"name": "Birthdays",
"path": [
"People \u0026 Society",
"Holidays \u0026 Special Events",
"Personal \u0026 General Events",
"Birthdays"
],
"idpath": [
"4bfa345531d3a9bff09432c924bcc729",
"cbbc7e6a1c50cc3c7e4d71a36b472834",
"0d19238741a70ddbb290a4fe4a6d6f48",
"351fce59b166d4c9bd4f7e2714a63a44"
],
"stats": {
"social_relevance": 0.0036452819,
"social_idf": 5.3955573311
},
"facets": [
[
"domain",
"event"
]
]
},
"e1a54dc1ecf8e9e2e08505f237fb5968": {
"id": "e1a54dc1ecf8e9e2e08505f237fb5968",
"name": "Throwback Thursday",
"path": [
"Computers \u0026 Electronics",
"Telecommunications",
"Internet",
"Websites \u0026 Digital Content",
"Memes \u0026 Hashtags",
"Throwback Thursday"
],
"idpath": [
"bdc03d860e5f33c08146faa43487c1bd",
"2712a67ea6c5398779d806a7a5f016eb",
"bbd7a35fae11c6cde461e75bd99e1b1a",
"78971b721e12d951c071b2e3d01c74e8",
"00b261e650d58689f4c50f6728f90d33",
"e1a54dc1ecf8e9e2e08505f237fb5968"
],
"stats": {
"social_relevance": 0.0001028757,
"social_idf": 8.9632244211
},
"facets": []
},
"f92c6cc9611ee197c2b747583ae27bb7": {
"id": "f92c6cc9611ee197c2b747583ae27bb7",
"name": "Flying Cars",
"path": [
"Vehicles",
"Automotive",
"Automotive Vehicles",
"Cars",
"Cars [No Make or Model Specified]",
"Concept Cars",
"Flying Cars"
],
"idpath": [
"164558a2ed9ad8d0a53b550c47f59a8d",
"351eb1e0259f83174a2d0989dd59b362",
"0e2aef22ab0d79d841d91eb4f88182de",
"1e8320e16458428adfa0a0c437960883",
"3ed56d5fe16ef7b9015e18beb22a3af5",
"bd8525cf683b6bc0079481e3b342940e",
"f92c6cc9611ee197c2b747583ae27bb7"
],
"stats": {
"social_relevance": 7.3207e-6,
"social_idf": 11.6060341003
},
"facets": []
},
"e77926f4edd0802c8ccae902ca3ab481": {
"id": "e77926f4edd0802c8ccae902ca3ab481",
"name": "Science Fiction",
"path": [
"Arts \u0026 Entertainment",
"General Arts \u0026 Entertainment",
"Arts \u0026 Entertainment Reference",
"Arts \u0026 Entertainment Genres",
"Science Fiction"
],
"idpath": [
"90a7a21c5fe42569fb5bb0d28ce9f77a",
"510ab43297466c29e7c115a5deb9e829",
"274625376346f0c0f766cd7214aee558",
"6a3d1570b55a8c6f8e13cf208bad8c48",
"e77926f4edd0802c8ccae902ca3ab481"
],
"stats": {
"social_relevance": 6.10062e-5,
"social_idf": 9.4857705641
},
"facets": []
},
"c3c123ab122a63e915c59bfb4452f963": {
"id": "c3c123ab122a63e915c59bfb4452f963",
"name": "Time Lapse Photography",
"path": [
"Arts \u0026 Entertainment",
"Art \u0026 Architecture",
"Photographic \u0026 Digital Arts",
"Photography",
"Photography Reference",
"Photography Styles",
"Time Lapse Photography"
],
"idpath": [
"90a7a21c5fe42569fb5bb0d28ce9f77a",
"9c5fe10a2ef8ec077a3e9f6f9716832c",
"e2d5a95ec2e5449aa3ca32200dc1ba11",
"e2a24e73ddf0f86f4b24bb0b63de8c7a",
"f27736734d08638cfeff796c613d9f94",
"3e69664a4bf73930e84ab9c04d5aa29b",
"c3c123ab122a63e915c59bfb4452f963"
],
"stats": {
"social_relevance": 1.7339e-6,
"social_idf": 13.0463956827
},
"facets": []
},
"167552b27327fc95f4dd5ad057660454": {
"id": "167552b27327fc95f4dd5ad057660454",
"name": "Ken Jennings",
"path": [
"Books \u0026 Literature",
"Writers",
"Authors",
"Ken Jennings"
],
"idpath": [
"abbae30350b924c4dffcbffc3052b450",
"42ed27bd6214641b86d538bb6e68a19a",
"f1e46f3f9726db4cd8fae40fe06b48bf",
"167552b27327fc95f4dd5ad057660454"
],
"stats": {
"social_relevance": 1.7981e-6,
"social_idf": 13.0100280386
},
"facets": []
},
"beb03942afeb6c7819a1ebd803b17246": {
"id": "beb03942afeb6c7819a1ebd803b17246",
"name": "Students",
"path": [
"Jobs \u0026 Education",
"Education",
"Education [No Level Specified]",
"Education Resources \u0026 Information",
"Educational Resources \u0026 Information [No Subject Specified]",
"Students"
],
"idpath": [
"65ace7f404e084a6a2d7f326aa5d8643",
"7cb98cd3218f67a46f65485e02dcd50f",
"e77975649d2ad1259aeea1b242cc0579",
"2d558f872db06bb225d62b6cf7616563",
"512669d0b764d09998518c04946752da",
"beb03942afeb6c7819a1ebd803b17246"
],
"stats": {
"social_relevance": 0.0011491644,
"social_idf": 6.5499559255
},
"facets": []
},
"6c40a85c0e21602bd49dac13495c442a": {
"id": "6c40a85c0e21602bd49dac13495c442a",
"name": "Tetris",
"path": [
"Games \u0026 Toys",
"Video Games",
"Video Game Products",
"Video Game Titles",
"Puzzle Video Games",
"Tetris Video Game Series",
"Tetris"
],
"idpath": [
"798f51fd6b8d172fa4fd718313c8c4c6",
"761a66aa4f58df6fdc5151837e392ffa",
"e85b2a2795db3616a2e4efe77e9763d3",
"d88ad5e8fd267e2df8bdc6f257dd8051",
"b00536cd955c6954df027e65017046f5",
"5a6e03a1f3b3a7890f2941156e8faf89",
"6c40a85c0e21602bd49dac13495c442a"
],
"stats": {
"social_relevance": 1.51552e-5,
"social_idf": 10.8784007437
},
"facets": [
[
"domain",
"product"
],
[
"brand",
"tetris"
]
]
},
"b675e7ef766cdf32e0cd88dc126d1298": {
"id": "b675e7ef766cdf32e0cd88dc126d1298",
"name": "Hash Browns",
"path": [
"Food \u0026 Drink",
"Food",
"Produce",
"Vegetables",
"Potatoes",
"Potatoes [No Brand Specified]",
"Potato Dishes",
"Hash Browns"
],
"idpath": [
"18a737475478cc2140c5418862bf811a",
"42c09908ce0d200e3b712f804de7b283",
"fb3bc8da4d080e30af482bd523498992",
"e30d80dee7d477dfafe3f344670f46ba",
"87926bc9eabd9abe320173a55d48e7f3",
"e61d6aa6636b9191a31e48545cbd4eec",
"af9534726aae10528debab1c4ed8945e",
"b675e7ef766cdf32e0cd88dc126d1298"
],
"stats": {
"social_relevance": 1.15591e-5,
"social_idf": 11.1492756978
},
"facets": []
},
"416f528d257c527be78186310f94d849": {
"id": "416f528d257c527be78186310f94d849",
"name": "Largest Earthquakes",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Natural Sciences",
"Earth Sciences",
"Branches of Earth Science",
"Geology",
"Geological Events",
"Natural Disasters",
"Earthquakes",
"Largest Earthquakes"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"36c3f922da8fc76f982280ca44c8e4b8",
"3f98be34278d9e5a70bedafb5b31e8b2",
"a92ee8be0d06baa40a30a7066666fd84",
"c92f3d571292cadaece36a486dc5503a",
"6b362f1c0b4c37b1d31559b306160853",
"a660fb9474473991080ee711cdf56df9",
"75226c51631fd2d9e1a1f30d00db44a8",
"416f528d257c527be78186310f94d849"
],
"stats": {
"social_relevance": 3.6604e-6,
"social_idf": 12.2991812809
},
"facets": []
},
"f49381198e13b2bb011acabb7aff46ea": {
"id": "f49381198e13b2bb011acabb7aff46ea",
"name": "Robotics",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Applied Sciences",
"Branches of Applied Science",
"Engineering \u0026 Technology Sciences",
"Robotics"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"a2c3e64fb366e35a012b6e69dac465cd",
"8f82615dd462926368531bf0b109589f",
"d1702de50ae24507ea3d26a7baf80773",
"f49381198e13b2bb011acabb7aff46ea"
],
"stats": {
"social_relevance": 3.2237e-5,
"social_idf": 10.123632429
},
"facets": []
},
"377821e5967fbda300d6bd59cca3aa01": {
"id": "377821e5967fbda300d6bd59cca3aa01",
"name": "Space Suits",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Applied Sciences",
"Branches of Applied Science",
"Engineering \u0026 Technology Sciences",
"Space Technologies",
"Space Travel",
"Space Travel [No Agency Specified]",
"Space Suits"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"a2c3e64fb366e35a012b6e69dac465cd",
"8f82615dd462926368531bf0b109589f",
"d1702de50ae24507ea3d26a7baf80773",
"904fdc839f95149a2b9dfac6fb7f2069",
"d65f3cfe264d132de0b9b811cb905c37",
"c907f49501034ae4f62e0fb9a3b006a5",
"377821e5967fbda300d6bd59cca3aa01"
],
"stats": {
"social_relevance": 3.6604e-6,
"social_idf": 12.2991812809
},
"facets": []
},
"a9a0477ed754171d68bc94058b3f9a40": {
"id": "a9a0477ed754171d68bc94058b3f9a40",
"name": "Shrink Wrap",
"path": [
"Business \u0026 Industrial",
"General Business \u0026 Industrial",
"General Business \u0026 Industrial Equipment \u0026 Supplies",
"General Industrial Equipment \u0026 Supplies",
"Packaging \u0026 Shipping Equipment \u0026 Supplies",
"Packaging \u0026 Shipping Materials",
"Packaging \u0026 Shipping Films",
"Shrink Films",
"Shrink Wrap"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"85223b2c100418dea4b61c33ca47f862",
"01ff57b60884432a3db1346c6fb9a141",
"e7cf984c4f1310528d7a2b1f83aea118",
"c018ea484cf5bf5acea56c9176617c98",
"da79bed4388a93e1aaa952172e2e3018",
"90e46f802d5c90b853b90b2dc25a6612",
"6e709003c3ab5b23704d5fa75e7ea096",
"a9a0477ed754171d68bc94058b3f9a40"
],
"stats": {
"social_relevance": 8.99e-7,
"social_idf": 13.7031752191
},
"facets": [
[
"domain",
"product"
]
]
},
"41ed5d3e1d4025ff4c948a4522995797": {
"id": "41ed5d3e1d4025ff4c948a4522995797",
"name": "Astronauts \u0026 Cosmonauts",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Applied Sciences",
"Branches of Applied Science",
"Engineering \u0026 Technology Sciences",
"Space Technologies",
"Space Travel",
"Space Travel [No Agency Specified]",
"Astronauts \u0026 Cosmonauts"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"a2c3e64fb366e35a012b6e69dac465cd",
"8f82615dd462926368531bf0b109589f",
"d1702de50ae24507ea3d26a7baf80773",
"904fdc839f95149a2b9dfac6fb7f2069",
"d65f3cfe264d132de0b9b811cb905c37",
"c907f49501034ae4f62e0fb9a3b006a5",
"41ed5d3e1d4025ff4c948a4522995797"
],
"stats": {
"social_relevance": 2.45951e-5,
"social_idf": 10.3941975596
},
"facets": []
},
"7705bcc505f80038f272c7de24a8e6a1": {
"id": "7705bcc505f80038f272c7de24a8e6a1",
"name": "Fireworks",
"path": [
"People \u0026 Society",
"Holidays \u0026 Special Events",
"General Event Products",
"Party Supplies",
"General Party Supplies",
"Party Games \u0026 Activities Supplies",
"Fireworks"
],
"idpath": [
"4bfa345531d3a9bff09432c924bcc729",
"cbbc7e6a1c50cc3c7e4d71a36b472834",
"a8a26b219de2e27d398bca5c5dd6ba1c",
"5f9084bb3c6bbd6dddc96aef1e801e34",
"8f16325c03a73ef2d2dad03b184da2d3",
"1d7997e7f97f3d1a463cb24fd3ee3a22",
"7705bcc505f80038f272c7de24a8e6a1"
],
"stats": {
"social_relevance": 3.72459e-5,
"social_idf": 9.9792044452
},
"facets": []
},
"cc293f9a2ec42c5438ee90751be03b94": {
"id": "cc293f9a2ec42c5438ee90751be03b94",
"name": "Gambling",
"path": [
"Sports",
"Gambling"
],
"idpath": [
"a90bbe57ed6286594059454aab60d759",
"cc293f9a2ec42c5438ee90751be03b94"
],
"stats": {
"social_relevance": 0.0001541852,
"social_idf": 8.5585919525
},
"facets": []
},
"d43dd02c-697b-54be-ac60-a93d6ae39f18": {
"id": "d43dd02c-697b-54be-ac60-a93d6ae39f18",
"name": "MIT",
"path": [
"Organizations",
"MIT"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"d43dd02c-697b-54be-ac60-a93d6ae39f18"
],
"stats": null,
"facets": null
},
"99eb4ac4-974f-5805-b729-ef7a2b944c4d": {
"id": "99eb4ac4-974f-5805-b729-ef7a2b944c4d",
"name": "Institute",
"path": [
"Organizations",
"Institute"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"99eb4ac4-974f-5805-b729-ef7a2b944c4d"
],
"stats": null,
"facets": null
},
"d68982ca-a1f0-5c73-a435-6b7f427f0a9c": {
"id": "d68982ca-a1f0-5c73-a435-6b7f427f0a9c",
"name": "William Barton Rogers",
"path": [
"People",
"William Barton Rogers"
],
"idpath": [
"b5029184-4d4f-5783-919b-0a91c20fec73",
"d68982ca-a1f0-5c73-a435-6b7f427f0a9c"
],
"stats": null,
"facets": null
},
"723d7837-7b3d-5814-801c-eec10bfa0ef2": {
"id": "723d7837-7b3d-5814-801c-eec10bfa0ef2",
"name": "Consciousness",
"path": [
"Organizations",
"Consciousness"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"723d7837-7b3d-5814-801c-eec10bfa0ef2"
],
"stats": null,
"facets": null
},
"5ac57804-0e72-5fe5-a302-8f3b483d4e30": {
"id": "5ac57804-0e72-5fe5-a302-8f3b483d4e30",
"name": "@Terrafugia",
"path": [
"Organizations",
"@Terrafugia"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"5ac57804-0e72-5fe5-a302-8f3b483d4e30"
],
"stats": null,
"facets": null
},
"34458de6-1faf-51a7-8faa-d7b400443fbd": {
"id": "34458de6-1faf-51a7-8faa-d7b400443fbd",
"name": "Time-Lapse Video Shows Evolution",
"path": [
"Organizations",
"Time-Lapse Video Shows Evolution"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"34458de6-1faf-51a7-8faa-d7b400443fbd"
],
"stats": null,
"facets": null
},
"54b598f0-8b19-5311-8acb-d18bd079fdcc": {
"id": "54b598f0-8b19-5311-8acb-d18bd079fdcc",
"name": "@JeopardyJulia",
"path": [
"Products",
"@JeopardyJulia"
],
"idpath": [
"53f28005-8bf4-5fb0-85c1-cfbf57a4363e",
"54b598f0-8b19-5311-8acb-d18bd079fdcc"
],
"stats": null,
"facets": null
},
"100190ae-3bd4-5c47-bce2-4b314a4bc784": {
"id": "100190ae-3bd4-5c47-bce2-4b314a4bc784",
"name": "Nikola",
"path": [
"Organizations",
"Nikola"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"100190ae-3bd4-5c47-bce2-4b314a4bc784"
],
"stats": null,
"facets": null
},
"6cf60af7-cc35-5cb0-9096-0b572f746fd1": {
"id": "6cf60af7-cc35-5cb0-9096-0b572f746fd1",
"name": "Startup @WiTricity",
"path": [
"People",
"Startup @WiTricity"
],
"idpath": [
"b5029184-4d4f-5783-919b-0a91c20fec73",
"6cf60af7-cc35-5cb0-9096-0b572f746fd1"
],
"stats": null,
"facets": null
},
"3bbb442f-3415-53a4-bac2-7d05718c2029": {
"id": "3bbb442f-3415-53a4-bac2-7d05718c2029",
"name": "the Student Center",
"path": [
"Locations",
"the Student Center"
],
"idpath": [
"d5a74840-36e2-5078-b605-523a16ed49be",
"3bbb442f-3415-53a4-bac2-7d05718c2029"
],
"stats": null,
"facets": null
},
"14aa8718-b2c3-5289-a36c-97ef96951219": {
"id": "14aa8718-b2c3-5289-a36c-97ef96951219",
"name": "@eapsMIT",
"path": [
"Organizations",
"@eapsMIT"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"14aa8718-b2c3-5289-a36c-97ef96951219"
],
"stats": null,
"facets": null
},
"8c4decd2-a521-5b78-b832-b612a18c693d": {
"id": "8c4decd2-a521-5b78-b832-b612a18c693d",
"name": "Istanbul",
"path": [
"Locations",
"Istanbul"
],
"idpath": [
"d5a74840-36e2-5078-b605-523a16ed49be",
"8c4decd2-a521-5b78-b832-b612a18c693d"
],
"stats": null,
"facets": null
},
"1f3c312f-04bb-5c64-8163-86b93eff1fc5": {
"id": "1f3c312f-04bb-5c64-8163-86b93eff1fc5",
"name": "MIT\u0027s",
"path": [
"Organizations",
"MIT\u0027s"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"1f3c312f-04bb-5c64-8163-86b93eff1fc5"
],
"stats": null,
"facets": null
}
},
"chars": 850,
"overlay": {
"392e0d5873231ed423359e4ac5b8d27c": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"351fce59b166d4c9bd4f7e2714a63a44": {
"IAB_v2.0_2018": [
[
[
"150",
"Events and Attractions"
]
],
[
[
"150",
"Events and Attractions"
],
[
"163",
"Events and Attractions::Personal Celebrations \u0026 Life Events"
]
],
[
[
"170",
"Events and Attractions::Personal Celebrations \u0026 Life Events::Birthday"
]
]
]
},
"e1a54dc1ecf8e9e2e08505f237fb5968": {
"IAB_v2.0_2018": [
[
[
"632",
"Technology \u0026 Computing::Consumer Electronics"
],
[
"596",
"Technology \u0026 Computing"
]
],
[
[
"116",
"Business and Finance::Industries::Telecommunications Industry"
]
],
[
[
"619",
"Technology \u0026 Computing::Computing::Internet"
]
]
]
},
"f92c6cc9611ee197c2b747583ae27bb7": {
"IAB_v2.0_2018": [
[
[
"1",
"Automotive"
]
],
[
[
"2",
"Automotive::Auto Body Styles"
]
],
[
[
"16",
"Automotive::Auto Type"
]
],
[
[
"20",
"Automotive::Auto Type::Concept Cars"
]
]
]
},
"e77926f4edd0802c8ccae902ca3ab481": {
"IAB_v2.0_2018": []
},
"c3c123ab122a63e915c59bfb4452f963": {
"IAB_v2.0_2018": [
[
[
"206",
"Fine Art::Fine Art Photography"
],
[
"201",
"Fine Art"
]
],
[
[
"206",
"Fine Art::Fine Art Photography"
],
[
"255",
"Hobbies \u0026 Interests::Arts and Crafts::Photography"
]
]
]
},
"167552b27327fc95f4dd5ad057660454": {
"IAB_v2.0_2018": [
[
[
"42",
"Books and Literature"
]
]
]
},
"beb03942afeb6c7819a1ebd803b17246": {
"IAB_v2.0_2018": [
[
[
"123",
"Careers"
]
],
[
[
"92",
"Business and Finance::Industries::Education industry"
],
[
"132",
"Education"
]
]
]
},
"6c40a85c0e21602bd49dac13495c442a": {
"IAB_v2.0_2018": [
[
[
"239",
"Hobbies \u0026 Interests"
],
[
"269",
"Hobbies \u0026 Interests::Games and Puzzles"
]
],
[
[
"680",
"Video Gaming"
]
],
[
[
"685",
"Video Gaming::Video Game Genres"
],
[
"691",
"Video Gaming::Video Game Genres::Action-Adventure Video Games"
],
[
"692",
"Video Gaming::Video Game Genres::Adventure Video Games"
]
],
[
[
"698",
"Video Gaming::Video Game Genres::Puzzle Video Games"
]
]
]
},
"b675e7ef766cdf32e0cd88dc126d1298": {
"IAB_v2.0_2018": [
[
[
"210",
"Food \u0026 Drink"
]
]
]
},
"416f528d257c527be78186310f94d849": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"f49381198e13b2bb011acabb7aff46ea": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"377821e5967fbda300d6bd59cca3aa01": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"a9a0477ed754171d68bc94058b3f9a40": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
]
]
},
"41ed5d3e1d4025ff4c948a4522995797": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"7705bcc505f80038f272c7de24a8e6a1": {
"IAB_v2.0_2018": [
[
[
"150",
"Events and Attractions"
]
],
[
[
"161",
"Events and Attractions::Party Supplies and Decorations"
]
]
]
},
"cc293f9a2ec42c5438ee90751be03b94": {
"IAB_v2.0_2018": [
[
[
"483",
"Sports"
],
[
"226",
"Healthy Living::Fitness and Exercise::Participant Sports"
]
],
[
[
"181",
"Events and Attractions::Casinos \u0026 Gambling"
],
[
"524",
"Sports::Poker and Professional Gambling"
]
]
]
},
"d43dd02c-697b-54be-ac60-a93d6ae39f18": {
"IAB_v2.0_2018": []
},
"99eb4ac4-974f-5805-b729-ef7a2b944c4d": {
"IAB_v2.0_2018": []
},
"d68982ca-a1f0-5c73-a435-6b7f427f0a9c": {
"IAB_v2.0_2018": []
},
"723d7837-7b3d-5814-801c-eec10bfa0ef2": {
"IAB_v2.0_2018": []
},
"5ac57804-0e72-5fe5-a302-8f3b483d4e30": {
"IAB_v2.0_2018": []
},
"34458de6-1faf-51a7-8faa-d7b400443fbd": {
"IAB_v2.0_2018": []
},
"54b598f0-8b19-5311-8acb-d18bd079fdcc": {
"IAB_v2.0_2018": []
},
"100190ae-3bd4-5c47-bce2-4b314a4bc784": {
"IAB_v2.0_2018": []
},
"6cf60af7-cc35-5cb0-9096-0b572f746fd1": {
"IAB_v2.0_2018": []
},
"3bbb442f-3415-53a4-bac2-7d05718c2029": {
"IAB_v2.0_2018": []
},
"14aa8718-b2c3-5289-a36c-97ef96951219": {
"IAB_v2.0_2018": []
},
"8c4decd2-a521-5b78-b832-b612a18c693d": {
"IAB_v2.0_2018": []
},
"1f3c312f-04bb-5c64-8163-86b93eff1fc5": {
"IAB_v2.0_2018": []
}
}
},
"signature": {
"resource": "POST \/classify\/:type\/:result_id",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
Classify Text¶
Classify Text Calls
POST classify/text¶
Classify the submitted plain text and return scored categories and keywords.
Parameters¶
Parameter | Type | Description |
---|---|---|
text (required) | string | A plaintext string to be classified. |
classification_type (optional) | integer | Select the classification method: 1 for rule-based, 2 for model-based, or 0 for a hybrid rule-based + model-based (defaults to 0 ) |
ml_threshold (optional) | float | Specify a confidence threshold for accepting an ML prediction. A lower value increases recall at the expense of precision (defaults to 0.75 ) |
entities (optional) | boolean | Perform Named Entity Recognition (NER) on the content submitted (defaults to false ) |
sentiment (optional) | boolean | Perform sentiment analysis on the content submitted (defaults to false ) |
taxonomy_timestamp (optional) | integer | A Unix timestamp instructing the classifier to use categories from the eContext Taxonomy that existed at this point in time. This will allow recently deleted categories to remain and hides newly created categories |
dataset_id (optional) | string | A Custom Taxonomies id to use in lieu of the default eContext Taxonomy |
add_last_node (optional) | bool | Include the last category node, or leave at the parent category |
classify_limit (optional) | integer | Limit the number of categories that may be returned per post |
classify_timeout (optional) | float | The number of seconds to spend on a classification task |
Return¶
The result set includes scored_categories
and scored_keywords
as well as a categories
dictionary. The
scored_keywords
object contains a list of high-value phrases that eContext was able to pull out of the submitted
text as well as associated scores for each. The scored_categories
object contains a list of category_id
and
score
objects where the category_id
corresponds to an item in the categories
dictionary. Higher values
indicate a higher score.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @classify-text-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/classify/text
The contents of classify-text-input.json
:
{
"entities":true,
"sentiment": true,
"text":"The Red Cross What We Do: The American Red Cross exists to provide compassionate care to those in need. Our network of generous donors, volunteers and employees share a mission of preventing and relieving suffering, here at home and around the world, through five key service areas: Disaster Relief The Red Cross responds to approximately 64,000 disasters in the United States every year, ranging from home fires that affect a single family to hurricanes that affect tens of thousands, to earthquakes that impact millions. In these events, the Red Cross provides shelter, food, health and mental health services to help families and entire communities get back on their feet. Although the Red Cross is not a government agency, it is an essential part of the response when disaster strikes. We work in partnership with other agencies and organizations that provide services to disaster victims. Supporting America’s Military Families The Red Cross helps military members, veterans and their families prepare for, cope with, and respond to the challenges of military service. Emergency communications, training, support to wounded warriors and veterans, and access to community resources help an average of 150,000 military families and veterans annually. Lifesaving Blood Your donations of blood are what make the American Red Cross the largest single supplier of blood and blood products in the U.S. Each year, nearly 4 million people donate blood through the Red Cross, helping to provide more than 40% of America’s blood supply. Health and Safety Services The Red Cross is the nation’s leading provider of health and safety courses, such as CPR, First Aid and Lifeguard training. Each year, more than 9 million Americans participate in our training programs, including first responders, educators, babysitters, and people who want to be prepared to help others in an emergency. International Services The American Red Cross is part of the world’s largest humanitarian network with 13 million volunteers in 187 countries. Working together, we help respond to disasters, build safer communities, and teach the rules of war. Each year, we reach an average of more than 100 million people across the globe."
}
POST Response¶
{
"econtext": {
"classify": {
"scored_categories": [
{
"category_id": "b0abd2a963cb083923b5aaf6ec8b12f9",
"score": 0.16120027913468
},
{
"category_id": "c793808308ef14243db97af8ccf9ad8a",
"score": 0.15491974877879
},
{
"category_id": "fe1fb7c5db256c9c0c2af9f45d0194b4",
"score": 0.15282623866015
},
{
"category_id": "1107f31431901cf750672e78aa0744b9",
"score": 0.13398464759246
},
{
"category_id": "1a31cf982eb9390410094f39707db2eb",
"score": 0.11933007676204
},
{
"category_id": "2d3c01aa275e87f389821f10f0f1433f",
"score": 0.10467550593161
},
{
"category_id": "b4799258dfb2df2b13978438a6a6ec8e",
"score": 0.050244242847174
},
{
"category_id": "d1fcd82b76b41b3b24846474e725d716",
"score": 0.041870202372645
},
{
"category_id": "81b7c121d63f530187adf07e27f17342",
"score": 0.039078855547802
},
{
"category_id": "7d0f6ffe5b5949f8699a534d03cd4671",
"score": 0.03768318213538
}
],
"scored_keywords": [
{
"keyword": "health",
"score": 0.17703349282297
},
{
"keyword": "military",
"score": 0.15311004784689
},
{
"keyword": "veterans",
"score": 0.14354066985646
},
{
"keyword": "red cross",
"score": 0.14114832535885
},
{
"keyword": "volunteers",
"score": 0.11961722488038
},
{
"keyword": "blood your donations",
"score": 0.069377990430622
},
{
"keyword": "hurricanes",
"score": 0.057416267942584
},
{
"keyword": "humanitarian",
"score": 0.047846889952153
},
{
"keyword": "donate blood",
"score": 0.043062200956938
},
{
"keyword": "lifeguard",
"score": 0.043062200956938
}
],
"categories": {
"fe1fb7c5db256c9c0c2af9f45d0194b4": {
"id": "fe1fb7c5db256c9c0c2af9f45d0194b4",
"name": "American Red Cross",
"path": [
"People \u0026 Society",
"Social Groups \u0026 Issues",
"Emergencies, Disasters \u0026 Safety",
"Disaster Relief",
"International Red Cross and Red Crescent Movement",
"American Red Cross"
],
"idpath": [
"4bfa345531d3a9bff09432c924bcc729",
"e48d0942110598946dbfe4b5fa8dc924",
"1b76c4621627a905e40c2eaf1a93b85c",
"ad0b94eb59b7d1ba60cba3428d824e58",
"47383e0b647d2154ab0d0cdf19701717",
"fe1fb7c5db256c9c0c2af9f45d0194b4"
],
"stats": {
"social_relevance": 1.08527e-5,
"social_idf": 11.2123338338
},
"facets": [
[
"domain",
"facility"
]
]
},
"2d3c01aa275e87f389821f10f0f1433f": {
"id": "2d3c01aa275e87f389821f10f0f1433f",
"name": "Volunteering",
"path": [
"People \u0026 Society",
"Social Groups \u0026 Issues",
"Social Issues \u0026 Advocacy",
"Charity \u0026 Philanthropy",
"Volunteering"
],
"idpath": [
"4bfa345531d3a9bff09432c924bcc729",
"e48d0942110598946dbfe4b5fa8dc924",
"f9fb32661586c3ebe507622d8e8f773f",
"2d4b2a9a394ff9ce37a6ef552cd37f46",
"2d3c01aa275e87f389821f10f0f1433f"
],
"stats": {
"social_relevance": 0.0002027975,
"social_idf": 8.2845383539
},
"facets": []
},
"b4799258dfb2df2b13978438a6a6ec8e": {
"id": "b4799258dfb2df2b13978438a6a6ec8e",
"name": "Hurricanes \u0026 Cyclones",
"path": [
"Sciences \u0026 Humanities",
"Science",
"Natural Sciences",
"Earth Sciences",
"Branches of Earth Science",
"Atmospheric Science",
"Meteorology",
"Weather",
"Hurricanes \u0026 Cyclones"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"36c3f922da8fc76f982280ca44c8e4b8",
"3f98be34278d9e5a70bedafb5b31e8b2",
"a92ee8be0d06baa40a30a7066666fd84",
"2af22889ddd8dd6ed27c18e3dc2cb115",
"32b689b419a1166095a2c02cc3503670",
"df261c3fede05cc48a31e352bdfac50e",
"b4799258dfb2df2b13978438a6a6ec8e"
],
"stats": {
"social_relevance": 6.8327e-5,
"social_idf": 9.3724418788
},
"facets": []
},
"c793808308ef14243db97af8ccf9ad8a": {
"id": "c793808308ef14243db97af8ccf9ad8a",
"name": "Health",
"path": [
"Health"
],
"idpath": [
"c793808308ef14243db97af8ccf9ad8a"
],
"stats": {
"social_relevance": 0.0009595314,
"social_idf": 6.7303012302
},
"facets": []
},
"81b7c121d63f530187adf07e27f17342": {
"id": "81b7c121d63f530187adf07e27f17342",
"name": "Mental Health Services",
"path": [
"Health",
"Healthcare Services",
"Mental Health Services"
],
"idpath": [
"c793808308ef14243db97af8ccf9ad8a",
"43bb825aa41e7ebcafa1591abc3c5d15",
"81b7c121d63f530187adf07e27f17342"
],
"stats": {
"social_relevance": 3.28791e-5,
"social_idf": 10.1039079237
},
"facets": [
[
"domain",
"service"
]
]
},
"1107f31431901cf750672e78aa0744b9": {
"id": "1107f31431901cf750672e78aa0744b9",
"name": "Militaries",
"path": [
"Government",
"Government [No Location Specified]",
"Governmental Structures",
"National Governments",
"Militaries"
],
"idpath": [
"2aeb9349223b598a228ce6da9d8dd364",
"65daf9280247be20b6d6c88e68912658",
"a2833d90fa14ae4bf87d09d13a16d634",
"22a6d0da3aa764e6b7c11020dbc46ab2",
"1107f31431901cf750672e78aa0744b9"
],
"stats": {
"social_relevance": 0.000242869,
"social_idf": 8.1042242995
},
"facets": []
},
"b0abd2a963cb083923b5aaf6ec8b12f9": {
"id": "b0abd2a963cb083923b5aaf6ec8b12f9",
"name": "Military Veterans",
"path": [
"Government",
"Government [No Location Specified]",
"Governmental Structures",
"National Governments",
"Militaries",
"National Defense Forces [No Branch Specified]",
"Military Veterans"
],
"idpath": [
"2aeb9349223b598a228ce6da9d8dd364",
"65daf9280247be20b6d6c88e68912658",
"a2833d90fa14ae4bf87d09d13a16d634",
"22a6d0da3aa764e6b7c11020dbc46ab2",
"1107f31431901cf750672e78aa0744b9",
"b2713f7f076ce54a82346cc17f0a7a13",
"b0abd2a963cb083923b5aaf6ec8b12f9"
],
"stats": {
"social_relevance": 0.0001645883,
"social_idf": 8.4932988224
},
"facets": []
},
"1a31cf982eb9390410094f39707db2eb": {
"id": "1a31cf982eb9390410094f39707db2eb",
"name": "Blood Donations",
"path": [
"Health",
"Healthcare Services",
"Internal Medicine Services",
"Hematology Services",
"Blood \u0026 Bone Marrow Donations",
"Blood Donations"
],
"idpath": [
"c793808308ef14243db97af8ccf9ad8a",
"43bb825aa41e7ebcafa1591abc3c5d15",
"b8a4228d0e04381e80fd0687677ba6b0",
"0e28d1f1429449b3b11cfdee9915579c",
"e176a76af10d538b0a7ebf82caf205bc",
"1a31cf982eb9390410094f39707db2eb"
],
"stats": {
"social_relevance": 1.34856e-5,
"social_idf": 10.995125018
},
"facets": []
},
"7d0f6ffe5b5949f8699a534d03cd4671": {
"id": "7d0f6ffe5b5949f8699a534d03cd4671",
"name": "Lifeguards",
"path": [
"Jobs \u0026 Education",
"Jobs",
"Law Enforcement \u0026 Public Safety Careers",
"Law Enforcement \u0026 Public Safety Job Listings",
"Lifeguards"
],
"idpath": [
"65ace7f404e084a6a2d7f326aa5d8643",
"a04e132c5ed85ce41f23e38ad9996b66",
"7e2e38d02b19e143d50be40829b66f05",
"77824adc451da966cdcb41b3b5fc9e41",
"7d0f6ffe5b5949f8699a534d03cd4671"
],
"stats": {
"social_relevance": 7.1923e-6,
"social_idf": 11.6237336774
},
"facets": []
},
"d1fcd82b76b41b3b24846474e725d716": {
"id": "d1fcd82b76b41b3b24846474e725d716",
"name": "Humanitarianism",
"path": [
"People \u0026 Society",
"Social Groups \u0026 Issues",
"Social Issues \u0026 Advocacy",
"Social Issues \u0026 Advocacy [No Cause Specified]",
"Humanitarianism"
],
"idpath": [
"4bfa345531d3a9bff09432c924bcc729",
"e48d0942110598946dbfe4b5fa8dc924",
"f9fb32661586c3ebe507622d8e8f773f",
"3bb8d373b167c6b5c8f769a4f1866007",
"d1fcd82b76b41b3b24846474e725d716"
],
"stats": {
"social_relevance": 2.42741e-5,
"social_idf": 10.4073383531
},
"facets": []
},
"c0b7dfb1-7ef6-50c9-811a-1a708e54588a": {
"id": "c0b7dfb1-7ef6-50c9-811a-1a708e54588a",
"name": "the Red Cross",
"path": [
"Organizations",
"the Red Cross"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"c0b7dfb1-7ef6-50c9-811a-1a708e54588a"
],
"stats": null,
"facets": null
},
"7c2bfa2e-fcd9-5d84-a7f0-19c7aaf44849": {
"id": "7c2bfa2e-fcd9-5d84-a7f0-19c7aaf44849",
"name": "American",
"path": [
"Organizations",
"American"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"7c2bfa2e-fcd9-5d84-a7f0-19c7aaf44849"
],
"stats": null,
"facets": null
},
"516b1cb7-96a7-532b-9a38-bf92d43d0f1d": {
"id": "516b1cb7-96a7-532b-9a38-bf92d43d0f1d",
"name": "the United States",
"path": [
"Locations",
"the United States"
],
"idpath": [
"d5a74840-36e2-5078-b605-523a16ed49be",
"516b1cb7-96a7-532b-9a38-bf92d43d0f1d"
],
"stats": null,
"facets": null
},
"130ce71f-0663-53b5-84d6-25920651a296": {
"id": "130ce71f-0663-53b5-84d6-25920651a296",
"name": "U.S",
"path": [
"Locations",
"U.S"
],
"idpath": [
"d5a74840-36e2-5078-b605-523a16ed49be",
"130ce71f-0663-53b5-84d6-25920651a296"
],
"stats": null,
"facets": null
},
"9ad154c7-1e1f-5bc0-8314-74c07bc7913d": {
"id": "9ad154c7-1e1f-5bc0-8314-74c07bc7913d",
"name": "America",
"path": [
"Locations",
"America"
],
"idpath": [
"d5a74840-36e2-5078-b605-523a16ed49be",
"9ad154c7-1e1f-5bc0-8314-74c07bc7913d"
],
"stats": null,
"facets": null
},
"1229403": {
"id": 1229403,
"name": "Healthcare Services",
"path": [
"Health",
"Healthcare Services"
],
"idpath": [
1002000,
1229403
],
"stats": {
"social_relevance": 3.8466e-5,
"social_idf": 9.9469709506
},
"facets": null
},
"7e0a6060-c4b2-57e5-8139-fe6cc8e00975": {
"id": "7e0a6060-c4b2-57e5-8139-fe6cc8e00975",
"name": "CPR",
"path": [
"Organizations",
"CPR"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"7e0a6060-c4b2-57e5-8139-fe6cc8e00975"
],
"stats": null,
"facets": null
},
"d74a7093-e576-539c-ace5-9efb7fce0153": {
"id": "d74a7093-e576-539c-ace5-9efb7fce0153",
"name": "First Aid",
"path": [
"Organizations",
"First Aid"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"d74a7093-e576-539c-ace5-9efb7fce0153"
],
"stats": null,
"facets": null
},
"d515c917-0e04-59da-bf21-cab2ef5249e4": {
"id": "d515c917-0e04-59da-bf21-cab2ef5249e4",
"name": "Americans",
"path": [
"Organizations",
"Americans"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"d515c917-0e04-59da-bf21-cab2ef5249e4"
],
"stats": null,
"facets": null
},
"22be2ebd-da59-50d8-8e2a-96331ca2328b": {
"id": "22be2ebd-da59-50d8-8e2a-96331ca2328b",
"name": "International Services",
"path": [
"Organizations",
"International Services"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"22be2ebd-da59-50d8-8e2a-96331ca2328b"
],
"stats": null,
"facets": null
},
"0eed0a7c-53e6-5da3-9c1a-5311a7027607": {
"id": "0eed0a7c-53e6-5da3-9c1a-5311a7027607",
"name": "The American Red Cross",
"path": [
"Organizations",
"The American Red Cross"
],
"idpath": [
"003469e8-80c6-51da-8ea8-e22db254fb74",
"0eed0a7c-53e6-5da3-9c1a-5311a7027607"
],
"stats": null,
"facets": null
}
},
"entities": [
{
"category_id": "c0b7dfb1-7ef6-50c9-811a-1a708e54588a",
"type": "ORG"
},
{
"category_id": "7c2bfa2e-fcd9-5d84-a7f0-19c7aaf44849",
"type": "NORP"
},
{
"category_id": "fe1fb7c5db256c9c0c2af9f45d0194b4",
"type": "ORG"
},
{
"category_id": "516b1cb7-96a7-532b-9a38-bf92d43d0f1d",
"type": "GPE"
},
{
"category_id": "c0b7dfb1-7ef6-50c9-811a-1a708e54588a",
"type": "ORG"
},
{
"category_id": "c0b7dfb1-7ef6-50c9-811a-1a708e54588a",
"type": "ORG"
},
{
"category_id": "130ce71f-0663-53b5-84d6-25920651a296",
"type": "GPE"
},
{
"category_id": "c0b7dfb1-7ef6-50c9-811a-1a708e54588a",
"type": "ORG"
},
{
"category_id": "9ad154c7-1e1f-5bc0-8314-74c07bc7913d",
"type": "GPE"
},
{
"category_id": 1229403,
"type": "ORG"
},
{
"category_id": "7e0a6060-c4b2-57e5-8139-fe6cc8e00975",
"type": "ORG"
},
{
"category_id": "d74a7093-e576-539c-ace5-9efb7fce0153",
"type": "ORG"
},
{
"category_id": "d515c917-0e04-59da-bf21-cab2ef5249e4",
"type": "NORP"
},
{
"category_id": "22be2ebd-da59-50d8-8e2a-96331ca2328b",
"type": "ORG"
},
{
"category_id": "0eed0a7c-53e6-5da3-9c1a-5311a7027607",
"type": "ORG"
}
],
"sentiment": 0.73522631578947,
"chars": 2204,
"overlay": {
"fe1fb7c5db256c9c0c2af9f45d0194b4": {
"IAB_v2.0_2018": []
},
"2d3c01aa275e87f389821f10f0f1433f": {
"IAB_v2.0_2018": []
},
"b4799258dfb2df2b13978438a6a6ec8e": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"c793808308ef14243db97af8ccf9ad8a": {
"IAB_v2.0_2018": [
[
[
"286",
"Medical Health"
]
]
]
},
"81b7c121d63f530187adf07e27f17342": {
"IAB_v2.0_2018": [
[
[
"286",
"Medical Health"
]
]
]
},
"1107f31431901cf750672e78aa0744b9": {
"IAB_v2.0_2018": []
},
"b0abd2a963cb083923b5aaf6ec8b12f9": {
"IAB_v2.0_2018": []
},
"1a31cf982eb9390410094f39707db2eb": {
"IAB_v2.0_2018": [
[
[
"286",
"Medical Health"
]
]
]
},
"7d0f6ffe5b5949f8699a534d03cd4671": {
"IAB_v2.0_2018": [
[
[
"123",
"Careers"
]
]
]
},
"d1fcd82b76b41b3b24846474e725d716": {
"IAB_v2.0_2018": []
},
"c0b7dfb1-7ef6-50c9-811a-1a708e54588a": {
"IAB_v2.0_2018": []
},
"7c2bfa2e-fcd9-5d84-a7f0-19c7aaf44849": {
"IAB_v2.0_2018": []
},
"516b1cb7-96a7-532b-9a38-bf92d43d0f1d": {
"IAB_v2.0_2018": []
},
"130ce71f-0663-53b5-84d6-25920651a296": {
"IAB_v2.0_2018": []
},
"9ad154c7-1e1f-5bc0-8314-74c07bc7913d": {
"IAB_v2.0_2018": []
},
"1229403": {
"IAB_v2.0_2018": [
[
[
"286",
"Medical Health"
]
]
]
},
"7e0a6060-c4b2-57e5-8139-fe6cc8e00975": {
"IAB_v2.0_2018": []
},
"d74a7093-e576-539c-ace5-9efb7fce0153": {
"IAB_v2.0_2018": []
},
"d515c917-0e04-59da-bf21-cab2ef5249e4": {
"IAB_v2.0_2018": []
},
"22be2ebd-da59-50d8-8e2a-96331ca2328b": {
"IAB_v2.0_2018": []
},
"0eed0a7c-53e6-5da3-9c1a-5311a7027607": {
"IAB_v2.0_2018": []
}
}
},
"signature": {
"resource": "POST \/classify\/:type\/:result_id",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
Classify URL¶
Classify URL Calls
POST classify/url¶
Classify the submitted URL and return scored categories and keywords.
The Classify URL call honors the robots.txt file from the site of the specified URL. In the case that the specified URL is blocked by robots.txt, a 403 error will be returned to the user with an error message indicating same.
The Classify URL call also requires that the URL being examined must adhere to a
content-type and content-length standard. The Content-type
header for the
URL must be one of the following: text/plain
, text/html
, text/xhtml
,
application/xhtml+xml
, text/xml
, application/xml
. The
Content-length
header must present a value less than or equal to 256000
bytes.
Parameters¶
Parameter | Type | Description |
---|---|---|
url (required) | string | A fully qualified URL to be retrieved and classified. |
classification_type (optional) | integer | Select the classification method: 1 for rule-based, 2 for model-based, or 0 for a hybrid rule-based + model-based (defaults to 0 ) |
ml_threshold (optional) | float | Specify a confidence threshold for accepting an ML prediction. A lower value increases recall at the expense of precision (defaults to 0.75 ) |
cache_skip (optional) | boolean | Rescrape a URL for HTML content rather than using a possibly cached scrape (defaults to false ) |
entities (optional) | boolean | Perform Named Entity Recognition (NER) on the content submitted (defaults to false ) |
sentiment (optional) | boolean | Perform sentiment analysis on the content submitted (defaults to false ) |
min_tags (optional) | integer | eContext uses a smart parsing library to extract only the most relevant content from a webpage, and ignore areas likely to be less relevant (navigation, footers, etc). However, for some pages this may result in less content extracted than expected. Use this parameter to set a minimum number of HTML tags the smart library must extract; if the result is less than this minimum, eContext will extract content from all HTML tags (eg, a full-page parse). |
taxonomy_timestamp (optional) | integer | A Unix timestamp instructing the classifier to use categories from the eContext Taxonomy that existed at this point in time. This will allow recently deleted categories to remain and hides newly created categories |
dataset_id (optional) | string | A Custom Taxonomies id to use in lieu of the default eContext Taxonomy |
add_last_node (optional) | bool | Include the last category node, or leave at the parent category |
classify_limit (optional) | integer | Limit the number of categories that may be returned per post |
classify_timeout (optional) | float | The number of seconds to spend on a classification task |
Return¶
The result set includes scored_categories
and scored_keywords
as well as a categories
dictionary. The
scored_keywords
object contains a list of high-value phrases that eContext was able to pull out of the submitted text
as well as associated scores for each. The scored_categories
object contains a list of category_id
and score
objects where the category_id
corresponds to an item in the categories
dictionary. Higher values indicate a higher
score.
Example Request¶
POST Request¶
curl -X POST -u username:password --data-binary @classify-url-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/classify/url
The contents of classify-url-input.json
:
{
"async": false,
"url":"http://topics.info.com/Parks_4679"
}
POST Response¶
{
"econtext": {
"classify": {
"title": "Semantic Text Classification | eContext Taxonomy and Data Structure |",
"scored_categories": [
{
"category_id": "6981e993569ba5af3cc14d7c3a05fc76",
"score": 0.66405638214565
},
{
"category_id": "1a9587f016d90b4cfb0c473039c98f3a",
"score": 0.065779169929522
},
{
"category_id": "b2ba2d3dc01ec7dea4263ebd882f9e86",
"score": 0.043852779953015
},
{
"category_id": "c29f157a195759a39cc27e7c540cd4d9",
"score": 0.043852779953015
},
{
"category_id": "9bfd0bb46baa2306a253f745cec5b1f7",
"score": 0.037588097102584
},
{
"category_id": "71a84c532ab6124052e5b92f85dc5dd8",
"score": 0.034455755677369
},
{
"category_id": "34d5bf8766845bf437fe3c69663692f2",
"score": 0.027407987470634
},
{
"category_id": "fc2b4234fdf6b60d01daa7e34d8b5bae",
"score": 0.02662490211433
},
{
"category_id": "6c7d1b5fbb00b32a1132007c9c851995",
"score": 0.025058731401723
}
],
"scored_keywords": [
{
"keyword": "econtext",
"score": 0.63082437275986
},
{
"keyword": "video",
"score": 0.075268817204301
},
{
"keyword": "chatbots",
"score": 0.050179211469534
},
{
"keyword": "surveys",
"score": 0.043010752688172
},
{
"keyword": "keywords",
"score": 0.039426523297491
},
{
"keyword": "econtext's",
"score": 0.039426523297491
},
{
"keyword": "kantar",
"score": 0.028673835125448
},
{
"keyword": "scientist",
"score": 0.028673835125448
},
{
"keyword": "taxonomy",
"score": 0.028673835125448
}
],
"categories": {
"6981e993569ba5af3cc14d7c3a05fc76": {
"id": "6981e993569ba5af3cc14d7c3a05fc76",
"name": "eContext",
"path": [
"Business & Industrial",
"Advertising & Marketing",
"Advertising & Marketing Services",
"Internet Advertising & Marketing",
"Internet Advertising & Marketing Tools",
"eContext"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"4a90604ecbb8e54663f84f59ce4350c1",
"ab0630bafba120dedbb788c0b8d33091",
"56ee67cc2683e5c1e5dcf113f835fddb",
"e6229d3e428212d041b432f89399871a",
"6981e993569ba5af3cc14d7c3a05fc76"
],
"stats": {
"social_relevance": 6.42e-8,
"social_idf": 16.3422325487
},
"facets": [
[
"domain",
"service"
]
]
},
"1a9587f016d90b4cfb0c473039c98f3a": {
"id": "1a9587f016d90b4cfb0c473039c98f3a",
"name": "Video & Live Media Streaming",
"path": [
"Computers & Electronics",
"Telecommunications",
"Internet",
"Websites & Digital Content",
"File Hosting & Sharing",
"Video & Live Media Streaming"
],
"idpath": [
"bdc03d860e5f33c08146faa43487c1bd",
"2712a67ea6c5398779d806a7a5f016eb",
"bbd7a35fae11c6cde461e75bd99e1b1a",
"78971b721e12d951c071b2e3d01c74e8",
"25bd7afbfe29570a835b986b68518d79",
"1a9587f016d90b4cfb0c473039c98f3a"
],
"stats": {
"social_relevance": 0.003922828,
"social_idf": 5.3221781922
},
"facets": [
[
"domain",
"facility"
],
[
"domain",
"service"
]
]
},
"b2ba2d3dc01ec7dea4263ebd882f9e86": {
"id": "b2ba2d3dc01ec7dea4263ebd882f9e86",
"name": "Chatbots & Conversational Platforms",
"path": [
"Computers & Electronics",
"Computers",
"Computer Products",
"Computer Software",
"Apps",
"Application Software",
"Communications Software",
"Messaging Software",
"Chatbots & Conversational Platforms"
],
"idpath": [
"bdc03d860e5f33c08146faa43487c1bd",
"ed62d0b6672e5addd702fd780ccd185d",
"40cf7c7334801a84c1c52166595e3d7e",
"3f1ff940a8bdeb0c9804a879f88f598e",
"e4782eb0f978ded90481e2b177ead9c4",
"3295dd2a46d67ca4c723c481dac6ed5f",
"2f15d4c34b296dee69c2fab67cfe11e6",
"d039be7ef56e1a2d07e6dfb7509052ba",
"b2ba2d3dc01ec7dea4263ebd882f9e86"
],
"stats": {
"social_relevance": 1.29076e-5,
"social_idf": 11.0389276407
},
"facets": []
},
"71a84c532ab6124052e5b92f85dc5dd8": {
"id": "71a84c532ab6124052e5b92f85dc5dd8",
"name": "Keywords",
"path": [
"Business & Industrial",
"Advertising & Marketing",
"Advertising & Marketing Services",
"Internet Advertising & Marketing",
"Internet Advertising & Marketing [No Strategy Specified]",
"Keywords"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"4a90604ecbb8e54663f84f59ce4350c1",
"ab0630bafba120dedbb788c0b8d33091",
"56ee67cc2683e5c1e5dcf113f835fddb",
"c4b046136fcb9ae7bc9df7a1b4f6afe3",
"71a84c532ab6124052e5b92f85dc5dd8"
],
"stats": {
"social_relevance": 2.89619e-5,
"social_idf": 10.2307652092
},
"facets": []
},
"c29f157a195759a39cc27e7c540cd4d9": {
"id": "c29f157a195759a39cc27e7c540cd4d9",
"name": "Scientists",
"path": [
"Sciences & Humanities",
"Science",
"Science [No Branch Specified]",
"Scientists"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"3b54651274fceca46f708592533817b4",
"c29f157a195759a39cc27e7c540cd4d9"
],
"stats": {
"social_relevance": 0.0001907889,
"social_idf": 8.3455786733
},
"facets": []
},
"fc2b4234fdf6b60d01daa7e34d8b5bae": {
"id": "fc2b4234fdf6b60d01daa7e34d8b5bae",
"name": "Publicis Groupe",
"path": [
"Business & Industrial",
"Advertising & Marketing",
"Advertising & Marketing Services",
"Advertising & Marketing Services [No Media Type Specified]",
"Advertising & Marketing Services [No Industry or Demographic Specified]",
"Advertising & Marketing Agencies",
"Publicis Groupe"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"4a90604ecbb8e54663f84f59ce4350c1",
"ab0630bafba120dedbb788c0b8d33091",
"014c8b620691495410e338d79143c579",
"8bc5d713c6c3637d379d216d56e36a6e",
"12bcf2eeb20bbcb300f78e06378d5df9",
"fc2b4234fdf6b60d01daa7e34d8b5bae"
],
"stats": {
"social_relevance": 1.2201e-6,
"social_idf": 13.3977935696
},
"facets": []
},
"6c7d1b5fbb00b32a1132007c9c851995": {
"id": "6c7d1b5fbb00b32a1132007c9c851995",
"name": "Kantar",
"path": [
"Business & Industrial",
"Advertising & Marketing",
"Advertising & Marketing Services",
"Advertising & Marketing Services [No Media Type Specified]",
"Advertising & Marketing Services [No Industry or Demographic Specified]",
"Advertising & Marketing Agencies",
"WPP",
"Kantar"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"4a90604ecbb8e54663f84f59ce4350c1",
"ab0630bafba120dedbb788c0b8d33091",
"014c8b620691495410e338d79143c579",
"8bc5d713c6c3637d379d216d56e36a6e",
"12bcf2eeb20bbcb300f78e06378d5df9",
"8b3342227d08018b0171b0c661b9f996",
"6c7d1b5fbb00b32a1132007c9c851995"
],
"stats": {
"social_relevance": 5.78e-7,
"social_idf": 14.1450079714
},
"facets": []
},
"34d5bf8766845bf437fe3c69663692f2": {
"id": "34d5bf8766845bf437fe3c69663692f2",
"name": "Customer Service",
"path": [
"Business & Industrial",
"General Business & Industrial",
"General Business & Industrial Services",
"General Business Services",
"Business Operations, Management, & Support Services",
"Business Operations & Management",
"Customer Relations",
"Customer Service"
],
"idpath": [
"93ae18acd5845912d0719cf14e34fff0",
"85223b2c100418dea4b61c33ca47f862",
"63ad16a5babfd448801877882fee0516",
"60876790b7febe9ceaa6cc623cad9c20",
"71a8e104f880da61fb5cc3db0e10ec3c",
"a42adf2a895dd4d471b9391e072fc687",
"8599dc1f0e4ecf0e18102c9d18f42363",
"34d5bf8766845bf437fe3c69663692f2"
],
"stats": {
"social_relevance": 0.0002349703,
"social_idf": 8.1372873837
},
"facets": []
},
"9bfd0bb46baa2306a253f745cec5b1f7": {
"id": "9bfd0bb46baa2306a253f745cec5b1f7",
"name": "Surveys",
"path": [
"Sciences & Humanities",
"Science",
"Social Sciences",
"Sociology",
"Sociological Research Methods",
"Surveys"
],
"idpath": [
"9c15c34150b7e723fea0eb4b12878947",
"9954bdf75b1d9c9abde66f5fa8d8754f",
"c270f6632e37fe26329d9af4a515122c",
"f3df44a5265aff3cfda548122add9271",
"58a43bc17febd6642724d8acafec7275",
"9bfd0bb46baa2306a253f745cec5b1f7"
],
"stats": {
"social_relevance": 0.0001555337,
"social_idf": 8.5498836246
},
"facets": []
}
},
"entities": [],
"sentiment": 0.61099622641509,
"chars": 5663,
"overlay": {
"6981e993569ba5af3cc14d7c3a05fc76": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
],
[
[
"90",
"Business and Finance::Industries"
],
[
"91",
"Business and Finance::Industries::Advertising Industry"
],
[
"58",
"Business and Finance::Business::Marketing and Advertising"
]
],
[
[
"602",
"Technology & Computing::Computing::Computer Software and Applications"
]
]
]
},
"1a9587f016d90b4cfb0c473039c98f3a": {
"IAB_v2.0_2018": [
[
[
"632",
"Technology & Computing::Consumer Electronics"
],
[
"596",
"Technology & Computing"
]
],
[
[
"116",
"Business and Finance::Industries::Telecommunications Industry"
]
],
[
[
"619",
"Technology & Computing::Computing::Internet"
]
]
]
},
"b2ba2d3dc01ec7dea4263ebd882f9e86": {
"IAB_v2.0_2018": [
[
[
"632",
"Technology & Computing::Consumer Electronics"
],
[
"596",
"Technology & Computing"
]
],
[
[
"599",
"Technology & Computing::Computing"
]
],
[
[
"602",
"Technology & Computing::Computing::Computer Software and Applications"
]
]
]
},
"71a84c532ab6124052e5b92f85dc5dd8": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
],
[
[
"90",
"Business and Finance::Industries"
],
[
"91",
"Business and Finance::Industries::Advertising Industry"
],
[
"58",
"Business and Finance::Business::Marketing and Advertising"
]
]
]
},
"c29f157a195759a39cc27e7c540cd4d9": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
},
"fc2b4234fdf6b60d01daa7e34d8b5bae": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
],
[
[
"90",
"Business and Finance::Industries"
],
[
"91",
"Business and Finance::Industries::Advertising Industry"
],
[
"58",
"Business and Finance::Business::Marketing and Advertising"
]
]
]
},
"6c7d1b5fbb00b32a1132007c9c851995": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
],
[
[
"90",
"Business and Finance::Industries"
],
[
"91",
"Business and Finance::Industries::Advertising Industry"
],
[
"58",
"Business and Finance::Business::Marketing and Advertising"
]
]
]
},
"34d5bf8766845bf437fe3c69663692f2": {
"IAB_v2.0_2018": [
[
[
"52",
"Business and Finance"
],
[
"53",
"Business and Finance::Business"
]
],
[
[
"62",
"Business and Finance::Business::Business Administration"
],
[
"73",
"Business and Finance::Business::Business Operations"
]
],
[
[
"76",
"Business and Finance::Business::Executive Leadership & Management"
]
],
[
[
"74",
"Business and Finance::Business::Consumer Issues"
]
]
]
},
"9bfd0bb46baa2306a253f745cec5b1f7": {
"IAB_v2.0_2018": [
[
[
"464",
"Science"
]
]
]
}
}
},
"signature": {
"resource": "POST \/classify\/:type\/:result_id",
"status": "200 OK - successful",
"client_ip": "209.41.117.158"
}
}
}
Keyword Search¶
Keyword Search Calls
POST keywords/search¶
Execute a search of the eContext Keyword Dataset and retrieve matching keywords. Returns a result_id to the GET keywords/search/:result_id call. This call creates a new result resource that will be available for either 2 days or until consumption.
This function accepts two distinct types of queries:
- By Category (
"type":0
): Searches for keywords belonging to a specified category node (category only) or branch (category + descendants). - By Keyword (
"type":1
): Searches for keywords containing the words (including stemmed variants) of the input query.
See query and type description for formatting details.
Parameters¶
Parameter | Type | Description |
---|---|---|
query (required) | mixed | The query string, if search by Keyword, or an array of categories if searching by Category. If searching by Category, the query should be an array of key->value pairs where the key is the Category id and the value is a boolean, selecting the entire branch if set to true , or just the node, if set to false . |
type (required) | enum | What type of search is being performed. (0 = by Category, 1 = by Keyword) |
filters (optional) | array | Filters to be applied to this search. For more information please see section on Keyword Search Filters |
pagesize (optional) | integer | The number of keywords to show on a single result page. Default value is 1,000 |
limit (optional) | integer | The maximum number of keywords to return. There is a system maximum of 500,000. Default value is 25,000 |
Example Request By Keyword¶
POST Request¶
curl -X POST -u username:password --data-binary @keywords-search-a-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/keywords/search
The contents of keywords-search-a-input.json
:
{
"query":"hello world",
"type":1,
"limit": 25000,
"pagesize": 250,
"filters":{
"filters":[
{"filter":3, "value":[1, 2, 4, 16, 32, 64, 128, 256, 512], "invert":false}
]
}
}
POST Response¶
{
"econtext": {
"keywords": {
"count": 4086,
"pagesize": 250,
"pages": 17,
"limit": 25000,
"searchid": "7765ebd5f81ee17bd79cf5fbf650fc1379cf5251f4a090006250b796331a668b"
},
"signature": {
"resource": "GET /categories/map/:keyword",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
Example Request By Category¶
POST Request¶
curl -X POST -u username:password --data-binary @keywords-search-b-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/keywords/search
The contents of keywords-search-b-input.json
:
{
"query":{
"ac0fb32ea52f2c1228592ad6598c2cc2":false,
"eee9032c21b71047f1f3252565bfaf58":true
},
"type":0,
"limit": 25000,
"pagesize": 20,
"filters":{
"filters":[
{"filter":3, "value":[1, 2, 4, 16, 32, 64, 128, 256, 512], "invert":false}
]
}
}
POST Response¶
{
"econtext": {
"keywords": {
"count": 25000,
"pagesize": 20,
"pages": 1250,
"limit": 25000,
"searchid": "63c48c6eb0e25572fdd0f872a04f60c6377365cb2e9687bbbe39631b258ec289"
},
"signature": {
"resource": "GET /categories/map/:keyword",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
GET keywords/search/:result_id¶
Return keywords from the specified search. Each keyword contains a category_id that maps to a
Category in the associated “categories” dictionary. A null
value in the category_id
indicates that the keyword is currently unmapped to the eContext Taxonomy.
Parameters¶
Parameter | Type | Description |
---|---|---|
result_id (required) | string | The identifier specifying which search to return results from. The result_id is included in the response from a successful POST keywords/search call. |
page (optional) | integer | Specify which page to retrieve results from. If no page is specified, a default value of 1 is used. Indexing for pages begins at 1 . |
Example Request¶
GET Request¶
curl -X GET -u username:password \ https://api.econtext.com/v2/keywords/search/63c48c6eb0e25572fdd0f872a04f60c6377365cb2e9687bbbe39631b258ec289?page=1
GET Response¶
{
"econtext": {
"keywords": {
"cursor": {
"pages": 1250,
"current": 1,
"next": 2
},
"keywords": [
{
"keyword": "breaking bad",
"volume": 1680000,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking-bad",
"volume": 412500,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 6",
"volume": 82500,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad cast",
"volume": 67875,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 5",
"volume": 37125,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad recap",
"volume": 24825,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad wiki",
"volume": 24825,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad alternate ending",
"volume": 20325,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad episodes",
"volume": 20325,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 1",
"volume": 20325,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 5 episode 9",
"volume": 20325,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad action figures",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad review",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 2",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 5 episode 13",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad season 5 episode 14",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "how many seasons of breaking bad",
"volume": 16650,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad complete series",
"volume": 13575,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad merchandise",
"volume": 13575,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
},
{
"keyword": "breaking bad poster",
"volume": 13575,
"category_id": "ac0fb32ea52f2c1228592ad6598c2cc2"
}
],
"categories": {
"ac0fb32ea52f2c1228592ad6598c2cc2": {
"id": "ac0fb32ea52f2c1228592ad6598c2cc2",
"name": "Breaking Bad",
"path": [
"Arts & Entertainment",
"Movies & Television",
"Movie & TV Products",
"TV",
"Drama TV Shows",
"Breaking Bad"
],
"idpath": [
"0cc9e1516aaa38d4802a2ee5314ac4ab",
"06b7167107de9cff93e6738da9c044c4",
"8e4e953b861d4597cb5fae3b7de67ce5",
"b3728edb10af57dfbd941132f0c932ae",
"153fd544b9063cfdbe86aaf1b04882b4",
"ac0fb32ea52f2c1228592ad6598c2cc2"
],
"stats": {
"social_relevance": 0.0000381826,
"social_idf": 21067.359562841
}
}
}
},
"signature": {
"resource": "GET /keywords/search/:search_id",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
User¶
User Calls
GET user/attributes¶
Return eContext user information including tier depth visibility and user roles.
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/user/attributes
GET Response¶
{
"econtext": {
"user": {
"attributes": {
"account_id": "BJHba7T1c7JmUrMOAwDIp",
"username": "31bc9229f61ebfa4782036bda",
"group": "regular",
"tier_depth": 4
}
},
"signature": {
"resource": "GET /categories/map/:keyword",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
GET user/usage¶
Return API usage for the current billing cycle.
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/user/usage
GET Response¶
{
"econtext": {
"user": {
"end_date": "2018-01-01",
"start_date": "2018-01-31",
"total_usage": 495,
"usage": {
"2li2l3ij21lijzzea23ijadf2": {
"2016-07-05": {
"api.classify.social": 45,
"api.categories.map": 16
},
"2016-07-06": {
"api.classify.social": 306,
"api.classify.url": 9
},
"2016-07-07": {
"api.classify.url": 21,
"api.classify.social": 50,
"api.categories.search": 1
},
"2016-07-08": {
"api.classify.social": 43,
"api.classify.keywords": 3,
"api.classify.url": 1
}
}
}
},
"signature": {
"resource": "GET /user/usage",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
Custom Taxonomies¶
Custom Taxonomies
You can use our taxonomy engine to run against a much smaller custom taxonomy that you create and control directly.
GET /user/taxonomies¶
Retrieve a list of publicly available taxonomies and private custom taxonomies
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/user/taxonomies
GET Response¶
{
"econtext": {
"user": {
"private": {
"Colors": "604962c585d0bbf9724d03110effbe64f6289bd04fa3d65da4b03dfc06d0ddf5"
},
"public": []
},
"signature": {
"resource": "GET /user/taxonomies",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
POST /user/taxonomy¶
Create a new taxonomy in the eContext system that can be used to classify content. The data structure used to create the taxonomy is a hierarchically organized list of node objects. Each node object contains a “name”; a “positive_vocabs” list; a “negative_vocabs” list; and “nodes”, a list of node objects that are children of the current node object.
Parameters¶
Parameter | Type | Description |
---|---|---|
name (required) | string | A name used to identify your taxonomy |
nodes (required) | array | A nested array containing the taxonomy structure to create |
public | boolean | Create a publicly available taxonomy (admin only) |
Return¶
The result will return a dataset_id which is a globally unique identifier for the new taxonomy.
Example Request¶
Create a new “Colors” taxonomy that can then be used in classification tasks.
POST Request¶
curl -X POST -u username:password --data-binary @user-taxonomy-input.json \ --header "Content-type: application/json" \ https://api.econtext.com/v2/user/taxonomy
The contents of user-taxonomy-input.json
:
{
"name":"Colors",
"nodes":[
{"name":"Pink", "negative_vocab":[], "positive_vocab":["Pink"], "nodes":[
{"name":"Light Pink", "negative_vocab":[], "positive_vocab":["Light Pink"]},
{"name":"Hot Pink", "negative_vocab":[], "positive_vocab":["Hot Pink"]},
{"name":"Deep Pink", "negative_vocab":[], "positive_vocab":["Deep Pink"]},
{"name":"Pale Violet Red", "negative_vocab":[], "positive_vocab":["Pale Violet Red"]},
{"name":"Medium Violet Red", "negative_vocab":[], "positive_vocab":["Medium Violet Red"]}
]},
{"name":"Red", "negative_vocab":[], "positive_vocab":["Red"], "nodes":[
{"name":"Salmon", "negative_vocab":[], "positive_vocab":["Salmon"], "nodes":[
{"name":"Dark Salmon", "negative_vocab":[], "positive_vocab":["Dark Salmon"]},
{"name":"Light Salmon", "negative_vocab":[], "positive_vocab":["Light Salmon"]}
]},
{"name":"Light Coral", "negative_vocab":[], "positive_vocab":["Light Coral"]},
{"name":"Indian Red", "negative_vocab":[], "positive_vocab":["Indian Red"]},
{"name":"Crimson", "negative_vocab":[], "positive_vocab":["Crimson"]},
{"name":"Fire Brick", "negative_vocab":[], "positive_vocab":["Fire Brick"]},
{"name":"Dark Red", "negative_vocab":[], "positive_vocab":["Dark Red"]}
]},
{"name":"Orange", "negative_vocab":[], "positive_vocab":["Orange"], "nodes":[
{"name":"Orange Red", "negative_vocab":[], "positive_vocab":["Orange Red"]},
{"name":"Tomato", "negative_vocab":[], "positive_vocab":["Tomato"]},
{"name":"Coral", "negative_vocab":[], "positive_vocab":["Coral"]},
{"name":"Dark Orange", "negative_vocab":[], "positive_vocab":["Dark Orange"]}
]},
{"name":"Yellow", "negative_vocab":[], "positive_vocab":["Yellow"], "nodes":[
{"name":"Light Yellow", "negative_vocab":[], "positive_vocab":["Light Yellow"]},
{"name":"Lemon Chiffon", "negative_vocab":[], "positive_vocab":["Lemon Chiffon"]},
{"name":"Light Goldenrod Yellow", "negative_vocab":[], "positive_vocab":["Light Goldenrod Yellow"]},
{"name":"Pale Goldenrod", "negative_vocab":[], "positive_vocab":["Pale Goldenrod"]},
{"name":"Papaya Whip", "negative_vocab":[], "positive_vocab":["Papaya Whip"]},
{"name":"Moccasin", "negative_vocab":[], "positive_vocab":["Moccasin"]},
{"name":"Peach Puff", "negative_vocab":[], "positive_vocab":["Peach Puff"]},
{"name":"Khaki", "negative_vocab":[], "positive_vocab":["Khaki"]},
{"name":"Dark Khaki", "negative_vocab":[], "positive_vocab":["Dark Khaki"]},
{"name":"Gold", "negative_vocab":[], "positive_vocab":["Gold"]}
]},
{"name":"Brown", "negative_vocab":[], "positive_vocab":["Brown"], "nodes":[
{"name":"Cornsilk", "negative_vocab":[], "positive_vocab":["Cornsilk"]},
{"name":"Blanched Almond", "negative_vocab":[], "positive_vocab":["Blanched Almond"]},
{"name":"Bisque", "negative_vocab":[], "positive_vocab":["Bisque"]},
{"name":"Navajo White", "negative_vocab":[], "positive_vocab":["Navajo White"]},
{"name":"Wheat", "negative_vocab":[], "positive_vocab":["Wheat"]},
{"name":"Burly Wood", "negative_vocab":[], "positive_vocab":["Burly Wood"]},
{"name":"Tan", "negative_vocab":[], "positive_vocab":["Tan"]},
{"name":"Rosy Brown", "negative_vocab":[], "positive_vocab":["Rosy Brown"]},
{"name":"Sandy Brown", "negative_vocab":[], "positive_vocab":["Sandy Brown"]},
{"name":"Goldenrod", "negative_vocab":[], "positive_vocab":["Goldenrod"], "nodes":[
{"name":"Dark Goldenrod", "negative_vocab":[], "positive_vocab":["Dark Goldenrod"]}
]},
{"name":"Peru", "negative_vocab":[], "positive_vocab":["Peru"]},
{"name":"Chocolate", "negative_vocab":[], "positive_vocab":["Chocolate"]},
{"name":"Saddle Brown", "negative_vocab":[], "positive_vocab":["Saddle Brown"]},
{"name":"Sienna", "negative_vocab":[], "positive_vocab":["Sienna"]},
{"name":"Maroon", "negative_vocab":[], "positive_vocab":["Maroon"]}
]},
{"name":"Green", "negative_vocab":[], "positive_vocab":["Green"], "nodes":[
{"name":"Olive", "negative_vocab":[], "positive_vocab":["Olive"], "nodes":[
{"name":"Olive Drab", "negative_vocab":[], "positive_vocab":["Olive Drab"]},
{"name":"Dark Olive Green", "negative_vocab":[], "positive_vocab":["Dark Olive Green"]}
]},
{"name":"Yellow Green", "negative_vocab":[], "positive_vocab":["Yellow Green"]},
{"name":"Green Yellow", "negative_vocab":[], "positive_vocab":["Green Yellow"]},
{"name":"Lime", "negative_vocab":[], "positive_vocab":["Lime"], "nodes":[
{"name":"Lime Green", "negative_vocab":[], "positive_vocab":["Lime Green"]}
]},
{"name":"Lawn Green", "negative_vocab":[], "positive_vocab":["Lawn Green"]},
{"name":"Chartreuse", "negative_vocab":[], "positive_vocab":["Chartreuse"]},
{"name":"Spring Green", "negative_vocab":[], "positive_vocab":["Spring Green"], "nodes":[
{"name":"Medium Spring Green", "negative_vocab":[], "positive_vocab":["Medium Spring Green"]}
]},
{"name":"Light Green", "negative_vocab":[], "positive_vocab":["Light Green"]},
{"name":"Pale Green", "negative_vocab":[], "positive_vocab":["Pale Green"]},
{"name":"Sea Green", "negative_vocab":[], "positive_vocab":["Sea Green"], "nodes":[
{"name":"Medium Sea Green", "negative_vocab":[], "positive_vocab":["Medium Sea Green"]},
{"name":"Dark Sea Green", "negative_vocab":[], "positive_vocab":["Dark Sea Green"]}
]},
{"name":"Medium Aquamarine", "negative_vocab":[], "positive_vocab":["Medium Aquamarine"]},
{"name":"Forest Green", "negative_vocab":[], "positive_vocab":["Forest Green"]},
{"name":"Dark Green", "negative_vocab":[], "positive_vocab":["Dark Green"]}
]},
{"name":"Cyan", "negative_vocab":[], "positive_vocab":["Cyan"], "nodes":[
{"name":"Aqua", "negative_vocab":[], "positive_vocab":["Aqua"]},
{"name":"Light Cyan", "negative_vocab":[], "positive_vocab":["Light Cyan"]},
{"name":"Aquamarine", "negative_vocab":[], "positive_vocab":["Aquamarine"]},
{"name":"Turquoise", "negative_vocab":[], "positive_vocab":["Turquoise"], "nodes":[
{"name":"Pale Turquoise", "negative_vocab":[], "positive_vocab":["Pale Turquoise"]},
{"name":"Medium Turquoise", "negative_vocab":[], "positive_vocab":["Medium Turquoise"]},
{"name":"Dark Turquoise", "negative_vocab":[], "positive_vocab":["Dark Turquoise"]}
]},
{"name":"Light Sea Green", "negative_vocab":[], "positive_vocab":["Light Sea Green"]},
{"name":"Cadet Blue", "negative_vocab":[], "positive_vocab":["Cadet Blue"]},
{"name":"Dark Cyan", "negative_vocab":[], "positive_vocab":["Dark Cyan"]},
{"name":"Teal", "negative_vocab":[], "positive_vocab":["Teal"]}
]},
{"name":"Blue", "negative_vocab":[], "positive_vocab":["Blue"], "nodes":[
{"name":"Powder Blue", "negative_vocab":[], "positive_vocab":["Powder Blue"]},
{"name":"Light Blue", "negative_vocab":[], "positive_vocab":["Light Blue"]},
{"name":"Sky Blue", "negative_vocab":[], "positive_vocab":["Sky Blue"], "nodes":[
{"name":"Light Sky Blue", "negative_vocab":[], "positive_vocab":["Light Sky Blue"]},
{"name":"Deep Sky Blue", "negative_vocab":[], "positive_vocab":["Deep Sky Blue"]}
]},
{"name":"Dodger Blue", "negative_vocab":[], "positive_vocab":["Dodger Blue"]},
{"name":"Cornflower Blue", "negative_vocab":[], "positive_vocab":["Cornflower Blue"]},
{"name":"Steel Blue", "negative_vocab":[], "positive_vocab":["Steel Blue"], "nodes":[
{"name":"Light Steel Blue", "negative_vocab":[], "positive_vocab":["Light Steel Blue"]}
]},
{"name":"Royal Blue", "negative_vocab":[], "positive_vocab":["Royal Blue"]},
{"name":"Medium Blue", "negative_vocab":[], "positive_vocab":["Medium Blue"]},
{"name":"Dark Blue", "negative_vocab":[], "positive_vocab":["Dark Blue"]},
{"name":"Navy", "negative_vocab":[], "positive_vocab":["Navy"]},
{"name":"Midnight Blue", "negative_vocab":[], "positive_vocab":["Midnight Blue"]}
]},
{"name":"Purple, violet, and magenta colors", "negative_vocab":[], "positive_vocab":["purple", "violet", "magenta"], "nodes":[
{"name":"Lavender", "negative_vocab":[], "positive_vocab":["Lavender"]},
{"name":"Thistle", "negative_vocab":[], "positive_vocab":["Thistle"]},
{"name":"Plum", "negative_vocab":[], "positive_vocab":["Plum"]},
{"name":"Fuchsia", "negative_vocab":[], "positive_vocab":["Fuchsia"]},
{"name":"Orchid", "negative_vocab":[], "positive_vocab":["Orchid"], "nodes":[
{"name":"Medium Orchid", "negative_vocab":[], "positive_vocab":["Medium Orchid"]},
{"name":"Dark Orchid", "negative_vocab":[], "positive_vocab":["Dark Orchid"]}
]},
{"name":"Medium Purple", "negative_vocab":[], "positive_vocab":["Medium Purple"]},
{"name":"Violet", "negative_vocab":[], "positive_vocab":["Violet"], "nodes":[
{"name":"Blue Violet", "negative_vocab":[], "positive_vocab":["Blue Violet"]},
{"name":"Dark Violet", "negative_vocab":[], "positive_vocab":["Dark Violet"]}
]},
{"name":"Magenta", "negative_vocab":[], "positive_vocab":["Magenta"], "nodes":[
{"name":"Dark Magenta", "negative_vocab":[], "positive_vocab":["Dark Magenta"]}
]},
{"name":"Purple", "negative_vocab":[], "positive_vocab":["Purple"]},
{"name":"Indigo", "negative_vocab":[], "positive_vocab":["Indigo"]},
{"name":"Slate Blue", "negative_vocab":[], "positive_vocab":["Slate Blue"], "nodes":[
{"name":"Dark Slate Blue", "negative_vocab":[], "positive_vocab":["Dark Slate Blue"]},
{"name":"Medium Slate Blue", "negative_vocab":[], "positive_vocab":["Medium Slate Blue"]}
]}
]},
{"name":"White", "negative_vocab":[], "positive_vocab":["White"], "nodes":[
{"name":"Snow", "negative_vocab":[], "positive_vocab":["Snow"]},
{"name":"Honeydew", "negative_vocab":[], "positive_vocab":["Honeydew"]},
{"name":"Mint Cream", "negative_vocab":[], "positive_vocab":["Mint Cream"]},
{"name":"Azure", "negative_vocab":[], "positive_vocab":["Azure"]},
{"name":"Alice Blue", "negative_vocab":[], "positive_vocab":["Alice Blue"]},
{"name":"Ghost White", "negative_vocab":[], "positive_vocab":["Ghost White"]},
{"name":"White Smoke", "negative_vocab":[], "positive_vocab":["White Smoke"]},
{"name":"Seashell", "negative_vocab":[], "positive_vocab":["Seashell"]},
{"name":"Beige", "negative_vocab":[], "positive_vocab":["Beige"]},
{"name":"Old Lace", "negative_vocab":[], "positive_vocab":["Old Lace"]},
{"name":"Floral White", "negative_vocab":[], "positive_vocab":["Floral White"]},
{"name":"Ivory", "negative_vocab":[], "positive_vocab":["Ivory"]},
{"name":"Antique White", "negative_vocab":[], "positive_vocab":["Antique White"]},
{"name":"Linen", "negative_vocab":[], "positive_vocab":["Linen"]},
{"name":"Lavender Blush", "negative_vocab":[], "positive_vocab":["Lavender Blush"]},
{"name":"Misty Rose", "negative_vocab":[], "positive_vocab":["Misty Rose"]}
]},
{"name":"Gray and black colors", "negative_vocab":[], "positive_vocab":["grey", "gray", "black"], "nodes":[
{"name":"Gainsboro", "negative_vocab":[], "positive_vocab":["Gainsboro"]},
{"name":"Light Grey", "negative_vocab":[], "positive_vocab":["Light Grey"]},
{"name":"Silver", "negative_vocab":[], "positive_vocab":["Silver"]},
{"name":"Dark Gray", "negative_vocab":[], "positive_vocab":["Dark Gray"]},
{"name":"Gray", "negative_vocab":[], "positive_vocab":["Gray"]},
{"name":"Dim Gray", "negative_vocab":[], "positive_vocab":["Dim Gray"]},
{"name":"Slate Gray", "negative_vocab":[], "positive_vocab":["Slate Gray"], "nodes":[
{"name":"Light Slate Gray", "negative_vocab":[], "positive_vocab":["Light Slate Gray"]},
{"name":"Dark Slate Gray", "negative_vocab":[], "positive_vocab":["Dark Slate Gray"]}
]},
{"name":"Black", "negative_vocab":[], "positive_vocab":["Black"]}
]}
]
}
POST Response¶
{
"econtext": {
"user": {
"dataset_id": "604962c585d0bbf9724d03110effbe64f6289bd04fa3d65da4b03dfc06d0ddf5"
},
"signature": {
"resource": "POST /user/taxonomy",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
GET /user/taxonomy¶
Retrieve a stored taxonomy
Parameters¶
Parameter | Type | Description |
---|---|---|
dataset_id (required) | string | A globally unique custom taxonomy identifier |
Example Request¶
GET Request¶
curl -X GET -u username:password https://api.econtext.com/v2/user/taxonomy/604962c585d0bbf9724d03110effbe64f6289bd04fa3d65da4b03dfc06d0ddf5
GET Response¶
{
"econtext": {
"user": {
"taxonomy": {
"name": "Colors",
"nodes": [
{
"name": "Pink",
"negative_vocab": [],
"positive_vocab": [
"Pink"
],
"nodes": [
{
"name": "Light Pink",
"negative_vocab": [],
"positive_vocab": [
"Light Pink"
]
},
{
"name": "Hot Pink",
"negative_vocab": [],
"positive_vocab": [
"Hot Pink"
]
},
{
"name": "Deep Pink",
"negative_vocab": [],
"positive_vocab": [
"Deep Pink"
]
},
{
"name": "Pale Violet Red",
"negative_vocab": [],
"positive_vocab": [
"Pale Violet Red"
]
},
{
"name": "Medium Violet Red",
"negative_vocab": [],
"positive_vocab": [
"Medium Violet Red"
]
}
]
},
{
"name": "Red",
"negative_vocab": [],
"positive_vocab": [
"Red"
],
"nodes": [
{
"name": "Salmon",
"negative_vocab": [],
"positive_vocab": [
"Salmon"
],
"nodes": [
{
"name": "Dark Salmon",
"negative_vocab": [],
"positive_vocab": [
"Dark Salmon"
]
},
{
"name": "Light Salmon",
"negative_vocab": [],
"positive_vocab": [
"Light Salmon"
]
}
]
},
{
"name": "Light Coral",
"negative_vocab": [],
"positive_vocab": [
"Light Coral"
]
},
{
"name": "Indian Red",
"negative_vocab": [],
"positive_vocab": [
"Indian Red"
]
},
{
"name": "Crimson",
"negative_vocab": [],
"positive_vocab": [
"Crimson"
]
},
{
"name": "Fire Brick",
"negative_vocab": [],
"positive_vocab": [
"Fire Brick"
]
},
{
"name": "Dark Red",
"negative_vocab": [],
"positive_vocab": [
"Dark Red"
]
}
]
},
{
"name": "Orange",
"negative_vocab": [],
"positive_vocab": [
"Orange"
],
"nodes": [
{
"name": "Orange Red",
"negative_vocab": [],
"positive_vocab": [
"Orange Red"
]
},
{
"name": "Tomato",
"negative_vocab": [],
"positive_vocab": [
"Tomato"
]
},
{
"name": "Coral",
"negative_vocab": [],
"positive_vocab": [
"Coral"
]
},
{
"name": "Dark Orange",
"negative_vocab": [],
"positive_vocab": [
"Dark Orange"
]
}
]
},
{
"name": "Yellow",
"negative_vocab": [],
"positive_vocab": [
"Yellow"
],
"nodes": [
{
"name": "Light Yellow",
"negative_vocab": [],
"positive_vocab": [
"Light Yellow"
]
},
{
"name": "Lemon Chiffon",
"negative_vocab": [],
"positive_vocab": [
"Lemon Chiffon"
]
},
{
"name": "Light Goldenrod Yellow",
"negative_vocab": [],
"positive_vocab": [
"Light Goldenrod Yellow"
]
},
{
"name": "Pale Goldenrod",
"negative_vocab": [],
"positive_vocab": [
"Pale Goldenrod"
]
},
{
"name": "Papaya Whip",
"negative_vocab": [],
"positive_vocab": [
"Papaya Whip"
]
},
{
"name": "Moccasin",
"negative_vocab": [],
"positive_vocab": [
"Moccasin"
]
},
{
"name": "Peach Puff",
"negative_vocab": [],
"positive_vocab": [
"Peach Puff"
]
},
{
"name": "Khaki",
"negative_vocab": [],
"positive_vocab": [
"Khaki"
]
},
{
"name": "Dark Khaki",
"negative_vocab": [],
"positive_vocab": [
"Dark Khaki"
]
},
{
"name": "Gold",
"negative_vocab": [],
"positive_vocab": [
"Gold"
]
}
]
},
{
"name": "Brown",
"negative_vocab": [],
"positive_vocab": [
"Brown"
],
"nodes": [
{
"name": "Cornsilk",
"negative_vocab": [],
"positive_vocab": [
"Cornsilk"
]
},
{
"name": "Blanched Almond",
"negative_vocab": [],
"positive_vocab": [
"Blanched Almond"
]
},
{
"name": "Bisque",
"negative_vocab": [],
"positive_vocab": [
"Bisque"
]
},
{
"name": "Navajo White",
"negative_vocab": [],
"positive_vocab": [
"Navajo White"
]
},
{
"name": "Wheat",
"negative_vocab": [],
"positive_vocab": [
"Wheat"
]
},
{
"name": "Burly Wood",
"negative_vocab": [],
"positive_vocab": [
"Burly Wood"
]
},
{
"name": "Tan",
"negative_vocab": [],
"positive_vocab": [
"Tan"
]
},
{
"name": "Rosy Brown",
"negative_vocab": [],
"positive_vocab": [
"Rosy Brown"
]
},
{
"name": "Sandy Brown",
"negative_vocab": [],
"positive_vocab": [
"Sandy Brown"
]
},
{
"name": "Goldenrod",
"negative_vocab": [],
"positive_vocab": [
"Goldenrod"
],
"nodes": [
{
"name": "Dark Goldenrod",
"negative_vocab": [],
"positive_vocab": [
"Dark Goldenrod"
]
}
]
},
{
"name": "Peru",
"negative_vocab": [],
"positive_vocab": [
"Peru"
]
},
{
"name": "Chocolate",
"negative_vocab": [],
"positive_vocab": [
"Chocolate"
]
},
{
"name": "Saddle Brown",
"negative_vocab": [],
"positive_vocab": [
"Saddle Brown"
]
},
{
"name": "Sienna",
"negative_vocab": [],
"positive_vocab": [
"Sienna"
]
},
{
"name": "Maroon",
"negative_vocab": [],
"positive_vocab": [
"Maroon"
]
}
]
},
{
"name": "Green",
"negative_vocab": [],
"positive_vocab": [
"Green"
],
"nodes": [
{
"name": "Olive",
"negative_vocab": [],
"positive_vocab": [
"Olive"
],
"nodes": [
{
"name": "Olive Drab",
"negative_vocab": [],
"positive_vocab": [
"Olive Drab"
]
},
{
"name": "Dark Olive Green",
"negative_vocab": [],
"positive_vocab": [
"Dark Olive Green"
]
}
]
},
{
"name": "Yellow Green",
"negative_vocab": [],
"positive_vocab": [
"Yellow Green"
]
},
{
"name": "Green Yellow",
"negative_vocab": [],
"positive_vocab": [
"Green Yellow"
]
},
{
"name": "Lime",
"negative_vocab": [],
"positive_vocab": [
"Lime"
],
"nodes": [
{
"name": "Lime Green",
"negative_vocab": [],
"positive_vocab": [
"Lime Green"
]
}
]
},
{
"name": "Lawn Green",
"negative_vocab": [],
"positive_vocab": [
"Lawn Green"
]
},
{
"name": "Chartreuse",
"negative_vocab": [],
"positive_vocab": [
"Chartreuse"
]
},
{
"name": "Spring Green",
"negative_vocab": [],
"positive_vocab": [
"Spring Green"
],
"nodes": [
{
"name": "Medium Spring Green",
"negative_vocab": [],
"positive_vocab": [
"Medium Spring Green"
]
}
]
},
{
"name": "Light Green",
"negative_vocab": [],
"positive_vocab": [
"Light Green"
]
},
{
"name": "Pale Green",
"negative_vocab": [],
"positive_vocab": [
"Pale Green"
]
},
{
"name": "Sea Green",
"negative_vocab": [],
"positive_vocab": [
"Sea Green"
],
"nodes": [
{
"name": "Medium Sea Green",
"negative_vocab": [],
"positive_vocab": [
"Medium Sea Green"
]
},
{
"name": "Dark Sea Green",
"negative_vocab": [],
"positive_vocab": [
"Dark Sea Green"
]
}
]
},
{
"name": "Medium Aquamarine",
"negative_vocab": [],
"positive_vocab": [
"Medium Aquamarine"
]
},
{
"name": "Forest Green",
"negative_vocab": [],
"positive_vocab": [
"Forest Green"
]
},
{
"name": "Dark Green",
"negative_vocab": [],
"positive_vocab": [
"Dark Green"
]
}
]
},
{
"name": "Cyan",
"negative_vocab": [],
"positive_vocab": [
"Cyan"
],
"nodes": [
{
"name": "Aqua",
"negative_vocab": [],
"positive_vocab": [
"Aqua"
]
},
{
"name": "Light Cyan",
"negative_vocab": [],
"positive_vocab": [
"Light Cyan"
]
},
{
"name": "Aquamarine",
"negative_vocab": [],
"positive_vocab": [
"Aquamarine"
]
},
{
"name": "Turquoise",
"negative_vocab": [],
"positive_vocab": [
"Turquoise"
],
"nodes": [
{
"name": "Pale Turquoise",
"negative_vocab": [],
"positive_vocab": [
"Pale Turquoise"
]
},
{
"name": "Medium Turquoise",
"negative_vocab": [],
"positive_vocab": [
"Medium Turquoise"
]
},
{
"name": "Dark Turquoise",
"negative_vocab": [],
"positive_vocab": [
"Dark Turquoise"
]
}
]
},
{
"name": "Light Sea Green",
"negative_vocab": [],
"positive_vocab": [
"Light Sea Green"
]
},
{
"name": "Cadet Blue",
"negative_vocab": [],
"positive_vocab": [
"Cadet Blue"
]
},
{
"name": "Dark Cyan",
"negative_vocab": [],
"positive_vocab": [
"Dark Cyan"
]
},
{
"name": "Teal",
"negative_vocab": [],
"positive_vocab": [
"Teal"
]
}
]
},
{
"name": "Blue",
"negative_vocab": [],
"positive_vocab": [
"Blue"
],
"nodes": [
{
"name": "Powder Blue",
"negative_vocab": [],
"positive_vocab": [
"Powder Blue"
]
},
{
"name": "Light Blue",
"negative_vocab": [],
"positive_vocab": [
"Light Blue"
]
},
{
"name": "Sky Blue",
"negative_vocab": [],
"positive_vocab": [
"Sky Blue"
],
"nodes": [
{
"name": "Light Sky Blue",
"negative_vocab": [],
"positive_vocab": [
"Light Sky Blue"
]
},
{
"name": "Deep Sky Blue",
"negative_vocab": [],
"positive_vocab": [
"Deep Sky Blue"
]
}
]
},
{
"name": "Dodger Blue",
"negative_vocab": [],
"positive_vocab": [
"Dodger Blue"
]
},
{
"name": "Cornflower Blue",
"negative_vocab": [],
"positive_vocab": [
"Cornflower Blue"
]
},
{
"name": "Steel Blue",
"negative_vocab": [],
"positive_vocab": [
"Steel Blue"
],
"nodes": [
{
"name": "Light Steel Blue",
"negative_vocab": [],
"positive_vocab": [
"Light Steel Blue"
]
}
]
},
{
"name": "Royal Blue",
"negative_vocab": [],
"positive_vocab": [
"Royal Blue"
]
},
{
"name": "Medium Blue",
"negative_vocab": [],
"positive_vocab": [
"Medium Blue"
]
},
{
"name": "Dark Blue",
"negative_vocab": [],
"positive_vocab": [
"Dark Blue"
]
},
{
"name": "Navy",
"negative_vocab": [],
"positive_vocab": [
"Navy"
]
},
{
"name": "Midnight Blue",
"negative_vocab": [],
"positive_vocab": [
"Midnight Blue"
]
}
]
},
{
"name": "Purple, violet, and magenta colors",
"negative_vocab": [],
"positive_vocab": [
"purple",
"violet",
"magenta"
],
"nodes": [
{
"name": "Lavender",
"negative_vocab": [],
"positive_vocab": [
"Lavender"
]
},
{
"name": "Thistle",
"negative_vocab": [],
"positive_vocab": [
"Thistle"
]
},
{
"name": "Plum",
"negative_vocab": [],
"positive_vocab": [
"Plum"
]
},
{
"name": "Fuchsia",
"negative_vocab": [],
"positive_vocab": [
"Fuchsia"
]
},
{
"name": "Orchid",
"negative_vocab": [],
"positive_vocab": [
"Orchid"
],
"nodes": [
{
"name": "Medium Orchid",
"negative_vocab": [],
"positive_vocab": [
"Medium Orchid"
]
},
{
"name": "Dark Orchid",
"negative_vocab": [],
"positive_vocab": [
"Dark Orchid"
]
}
]
},
{
"name": "Medium Purple",
"negative_vocab": [],
"positive_vocab": [
"Medium Purple"
]
},
{
"name": "Violet",
"negative_vocab": [],
"positive_vocab": [
"Violet"
],
"nodes": [
{
"name": "Blue Violet",
"negative_vocab": [],
"positive_vocab": [
"Blue Violet"
]
},
{
"name": "Dark Violet",
"negative_vocab": [],
"positive_vocab": [
"Dark Violet"
]
}
]
},
{
"name": "Magenta",
"negative_vocab": [],
"positive_vocab": [
"Magenta"
],
"nodes": [
{
"name": "Dark Magenta",
"negative_vocab": [],
"positive_vocab": [
"Dark Magenta"
]
}
]
},
{
"name": "Purple",
"negative_vocab": [],
"positive_vocab": [
"Purple"
]
},
{
"name": "Indigo",
"negative_vocab": [],
"positive_vocab": [
"Indigo"
]
},
{
"name": "Slate Blue",
"negative_vocab": [],
"positive_vocab": [
"Slate Blue"
],
"nodes": [
{
"name": "Dark Slate Blue",
"negative_vocab": [],
"positive_vocab": [
"Dark Slate Blue"
]
},
{
"name": "Medium Slate Blue",
"negative_vocab": [],
"positive_vocab": [
"Medium Slate Blue"
]
}
]
}
]
},
{
"name": "White",
"negative_vocab": [],
"positive_vocab": [
"White"
],
"nodes": [
{
"name": "Snow",
"negative_vocab": [],
"positive_vocab": [
"Snow"
]
},
{
"name": "Honeydew",
"negative_vocab": [],
"positive_vocab": [
"Honeydew"
]
},
{
"name": "Mint Cream",
"negative_vocab": [],
"positive_vocab": [
"Mint Cream"
]
},
{
"name": "Azure",
"negative_vocab": [],
"positive_vocab": [
"Azure"
]
},
{
"name": "Alice Blue",
"negative_vocab": [],
"positive_vocab": [
"Alice Blue"
]
},
{
"name": "Ghost White",
"negative_vocab": [],
"positive_vocab": [
"Ghost White"
]
},
{
"name": "White Smoke",
"negative_vocab": [],
"positive_vocab": [
"White Smoke"
]
},
{
"name": "Seashell",
"negative_vocab": [],
"positive_vocab": [
"Seashell"
]
},
{
"name": "Beige",
"negative_vocab": [],
"positive_vocab": [
"Beige"
]
},
{
"name": "Old Lace",
"negative_vocab": [],
"positive_vocab": [
"Old Lace"
]
},
{
"name": "Floral White",
"negative_vocab": [],
"positive_vocab": [
"Floral White"
]
},
{
"name": "Ivory",
"negative_vocab": [],
"positive_vocab": [
"Ivory"
]
},
{
"name": "Antique White",
"negative_vocab": [],
"positive_vocab": [
"Antique White"
]
},
{
"name": "Linen",
"negative_vocab": [],
"positive_vocab": [
"Linen"
]
},
{
"name": "Lavender Blush",
"negative_vocab": [],
"positive_vocab": [
"Lavender Blush"
]
},
{
"name": "Misty Rose",
"negative_vocab": [],
"positive_vocab": [
"Misty Rose"
]
}
]
},
{
"name": "Gray and black colors",
"negative_vocab": [],
"positive_vocab": [
"grey",
"gray",
"black"
],
"nodes": [
{
"name": "Gainsboro",
"negative_vocab": [],
"positive_vocab": [
"Gainsboro"
]
},
{
"name": "Light Grey",
"negative_vocab": [],
"positive_vocab": [
"Light Grey"
]
},
{
"name": "Silver",
"negative_vocab": [],
"positive_vocab": [
"Silver"
]
},
{
"name": "Dark Gray",
"negative_vocab": [],
"positive_vocab": [
"Dark Gray"
]
},
{
"name": "Gray",
"negative_vocab": [],
"positive_vocab": [
"Gray"
]
},
{
"name": "Dim Gray",
"negative_vocab": [],
"positive_vocab": [
"Dim Gray"
]
},
{
"name": "Slate Gray",
"negative_vocab": [],
"positive_vocab": [
"Slate Gray"
],
"nodes": [
{
"name": "Light Slate Gray",
"negative_vocab": [],
"positive_vocab": [
"Light Slate Gray"
]
},
{
"name": "Dark Slate Gray",
"negative_vocab": [],
"positive_vocab": [
"Dark Slate Gray"
]
}
]
},
{
"name": "Black",
"negative_vocab": [],
"positive_vocab": [
"Black"
]
}
]
}
]
}
},
"signature": {
"resource": "GET /user/taxonomy/:dataset_id",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
DELETE /user/taxonomy/:dataset_id¶
Remove a custom taxonomy from the eContext API
Parameters¶
Parameter | Type | Description |
---|---|---|
dataset_id (required) | string | A globally unique custom taxonomy identifier |
Example Request¶
DELETE Request¶
curl -X DELETE -u username:password https://api.econtext.com/v2/user/taxonomy/604962c585d0bbf9724d03110effbe64f6289bd04fa3d65da4b03dfc06d0ddf5
DELETE Response¶
{
"econtext": {
"user": {
"result": true
},
"signature": {
"resource": "DELETE /user/taxonomy/:dataset_id",
"status": "200 OK - successful",
"client_ip": "127.0.0.1"
}
}
}
Keyword Search Filters¶
Contents
There are several filters that may be applied to a number of eContext API calls. Each filter should be represented as an object with at least two attributes.
filter: | An integer value that specifies the filter to apply. |
---|---|
value: | A mixed value containing the parameters to pass in to the filter. |
operator: | An integer value that is sometimes required specifies the operator to apply on the value . |
invert: | An optional boolean value which will invert the filter. If, for example, you wanted to retrieve only keywords that were about “Tobacco and Cigarettes” you could use the Keyword Flags filter and invert the filter. |
Available Filters¶
ID | Filter Name | Description |
---|---|---|
1 | Character Count | Filter results based on the character length of keywords |
2 | Word Count | Filter results based on the number of words in each keyword |
3 | Keyword Flags | Filter results based on various Keyword Flags |
5 | Search Volume | Filter results based on monthly search traffic estimates of keywords |
6 | Intent Flags | Filter results based on textual intent of keywords |
7 | Exclude Terms | Filter out results using the provided terms |
8 | Language Flags (beta) | Filter out results based on language |
Keyword Flags¶
ID | Flag Name | Description |
---|---|---|
1 | Invalid | Keyword fails punctuation and composition standards |
2 | General | Keyword fails general banned standards, including obscene language |
4 | Adult | Keyword contains adult content |
8 | Alcohol | Keyword contains content referring to alcohol |
16 | Fireworks | Keyword contains content referring to fireworks |
32 | Gambling | Keyword contains content referring to gambling |
64 | Prescription Drugs | Keyword contains content referring to prescription drugs |
128 | Tobacco and Cigarettes | Keyword contains content referring to smoking, tobacco, or cigarettes |
256 | Weapons | Keyword contains content referring to weapons |
512 | Brands (beta) | Keyword contains content referring to a known brand |
1024 | Location (beta) | Keyword contains content referring to a known location |
Intent Flags¶
ID | Flag Name | Description |
---|---|---|
1 | Purchase | Keywords related to “buying” ideas |
2 | Comparison | Keyword containing comparison ideas |
4 | Negative | Keyword containing negative terminologies |
8 | Question | Keywords expressing questions |
16 | Coupons | Keywords related to “coupon” and “deal” ideas |
Operators¶
ID | Flag Name | Description |
---|---|---|
0 | = | Equal to |
1 | != | Not equal to |
2 | < | Less than |
3 | <= | Less than or equal to |
4 | > | Greater than |
5 | >= | Greater than or equal to |
10 | | | Bitwise OR |
11 | & | Bitwise AND |
Filters¶
Character Count¶
The character count filter removes keywords that fall outside of the specified range. The value attribute of this filter specifies a character length limit.
Multiple instances of this filter may be passed in order to define customized ranges. An example of this filter, shown below, limits character length to between 20-30 characters.
The operator attribute is required for this filter.
Word Count¶
The word count filter removes keywords that fall outside of the specified range. The value attribute of this filter specifies a word length limit.
Multiple instances of this filter may be passed in order to define customized ranges. An example of this filter, shown below, limits word length to between 4-7 words.
Keyword Flags¶
The keyword flags filter allows a user to selectively filter out flagged keywords. For example, you could choose to eliminate most banned keywords (but allow keywords relating to alcohol and location).
Search Volume¶
The search volume filter removes keywords that fall outside the specified range. The value attribute of this filter specifies a monthly search traffic limit.
Multiple instances of this filter may be passed in order to define customized ranges. An example of this filter, shown below, returns keywords with an estimated monthly search volume of 1,000- 100,000.
The operator attribute is required for this filter.
Intent Flags¶
The intent filter restricts results to those keywords flagged as belonging to certain intent groupings, defined above. A single keyword may contain multiple intent flags.
Multiple instances of this filter may be passed in order to customize the result set. The example, provided below, returns keywords containing the “purchase” and “comparison” intent flags, but excluding the “negative” intent flag. Keywords that match this explicit criteria and contain the “questions” flag will also be included, as they are not explicitly excluded. Keywords containing no intent flags would not be included.
Exclude Terms¶
The exclude terms filter removes keywords containing any of the phrases specified in the filter. You may surround a phrase with double-quotes in order to search more precisely, as shown in the example below.
Please note that using this filter can significantly slow down search times. If you need to enter more than a few terms, you will experience better performance and results by refining your original query term.
By setting the invert operator to “true”, you can filter to show only those terms containing any of the specified words.
Language Flags (beta)¶
The language filter restricts results to those keywords flagged as belonging to the specified language. Keywords may contain multiple language flags, identified using ISO 639-2 three character language codes.
Multiple instances of this filter may be passed in order to customize the result set. The example, provided below, returns keywords that are flagged as Spanish.
Currently, keywords may be flagged as either English or Spanish. Other language offerings will be available in the future.
Example Requests¶
No Filters¶
A simple request with no filters passed.
curl -X POST -u username:password --data-binary @keywords-search-nofilters.json \ --header "Content-type: application/json" https://api.econtext.com/v2/keywords/search
The contents of @keywords-search-nofilters.json
:
{
"query": "hello world",
"type": 1,
"filters": null
}
Many Filters¶
A more complicated keyword search with many filters.
curl -X POST -u username:password --data-binary @keywords-search-filters.json \ --header "Content-type: application/json" https://api.econtext.com/v2/keywords/search
The contents of @keywords-search-filters.json
:
{
"query": "hello world",
"type": 1,
"filters": {
"filters":[
{"filter":1, "value":30, "operator":3},
{"filter":1, "value":20, "operator":5},
{"filter":2, "value":7, "operator":3},
{"filter":2, "value":4, "operator":5},
{"filter":3, "value":[1, 2, 4, 16, 32, 64, 128, 256, 512]},
{"filter":5, "value":100000, "operator":3},
{"filter":5, "value":1000, "operator":5},
{"filter":6, "value":[4], "invert":true},
{"filter":6, "value":[1,2], "operator":11},
{"filter":7, "value":["javascript", "c++", "php", "\"worlds\""]},
{"filter":8, "value":["spa"]}
]
}
}
Changelog¶
Version 1.2.17 - 2021-01-14¶
- Added a POST /categories/categories call to retrieve category and overlay information given a list of category ids
Version 1.2.16 - 2020-08-04¶
- Added an add_last_node parameter to classification calls
- Added a classify_limit parameter to classification calls to limit the number of category responses
Version 1.2.15 - 2020-06-16¶
- Minor bug fixes and performance improvements
Version 1.2.14 - 2020-03-26¶
- Added a classify_timeout parameter to classifiation calls. We can limit the amount of time we’ll spend on a single call. When the timeout is reached, results computed up to that point will be returned.
- Performance tuning
Version 1.2.13 - 2020-02-04¶
- Minor bug fixes and performance improvements
Version 1.2.12 - 2020-01-23¶
- Minor bug fixes and performance improvements
Version 1.2.11 - 2019-12-12¶
- Add an
ml_threshold
parameter to control machine learning results during classification. Setting this value lower will result in higher recall, but lower precision. async
is dropped as an option during classification calls. All classification calls will now return results in the body of the response object rather than allowing for retrieval later.
Version 1.2.10 - 2019-08-14¶
- Cache the HTML from URL classification to prevent recrawling the same URL if it is seen within a certain period of time. You can force a recrawl by passing in
cache_skip: true
in your POST data.
Version 1.2.9 - 2019-07-01¶
- Bug fixes
- Performance enhancements
Version 1.2.8 - 2019-04-10¶
- Bug fix for URL classification - all non-200 responses for individually submitted URLs to the API will return a 400.
- Specify a min_tags parameter in classify/url to fallback to a different extraction engine if not enough content is retrieved
- Expose a user/allotments call to show usage limits if applicable
- Bug fix where sometimes overlay output format was incorrect
Version 1.2.7 - 2019-03-05¶
- Introduction of Facets to Category objects. Facets can be used to help identify things like brands and products and makes our Categories a little bit richer.
Version 1.2.6 - 2019-01-08¶
- Significant changes to the eContext sentiment models as well as significant performance enhancement. Quickly retrieve sentiment on classification calls.
- New NLP features - language identification for URLs and other input text. Available now at
/v2/nlp/lid
Version 1.2.5 - 2018-10-25¶
- Added Sentiment to most classification calls. Generally, simply add a
"sentiment": true
parameter to the request body. - Added NLP parsing functions to the API at
/v2/nlp/parse
which performs POS tagging, NER, dependency parsing, entity extraction, etc. Parsing is currently limited to select users. Please contact eContext.ai if you’re interested in accessing these functions.
Version 1.2.0 - 2018-05-10¶
- Include new multi-lingual support language-support
- Improved the efficiency for Custom Taxonomies
- Increased performance of the classification engine to provide greater detail and insight into classifications
Version 1.1.6 - 2017-03-16¶
- Several performance enhancements and bug fixes
- Changed error handling on
classify/url
to be a bit more robust - Add client-controlled Custom Taxonomies that can be used by the classification engine in lieu of the default eContext taxonomy
Version 1.1.5 - 2017-02-02¶
- Specify a
taxonomy_timestamp
parameter to freeze the eContext Taxonomy for long-running classification tasks - Return more useful errors for invalid filters in
keywords/search
calls
Version 1.1.4 - 2017-01-16¶
- Added
scored_keywords
entries for items classified in ML Classification results - Fixed bug where
classify/url
would fail if there was a new-line character in the input - Significant expansion and updates to internal keyword models
Version 1.1.3 - 2016-11-11¶
- Better recognition of duplicate entity categories, particularly names in ML Classification results
Version 1.1.2 - 2016-09-29¶
- Added usage limits to assist users in keeping to API usage quotas
- Integrated entity categories into the main
categories
object in response objects
Version 1.1.1 - 2016-08-16¶
- Specify a
branches
parameter when classifying keywords to restrict to a particular vertical - Specify a
best_match
parameter (defaults totrue
) to classify/social, classify/html, classify/url, and classify/text calls which will force the engine to retain submatches instead of removing them from results - Added the ability to create custom taxonomies that users may use for specific classification tasks
Version 1.1.0 - 2016-07-11¶
- Added fallback NLP Entity extraction options in cases where the eContext Taxonomy does not provide coverage
- Added keyword flagging to identify keywords that may be sensitive to particular audiences
- Added social content flagging to identify social media posts that may be sensitive to particular audiences
- Changed classify/url to return a 403 Status Code if a requested URL is blocked by that domains robots.txt
Version 1.0.24¶
- New eContext translation service provides fast translation for incoming content. Supports Spanish, French, Portuguese, Italian, Dutch, German content
- Translated content is now passed through to your classification results
Version 1.0.23¶
- Added the Twitter Interest Taxonomy overlay as an available client add-on
- Changed format of overlays to be more descriptive - each taxonomy map now returns as a list with Tier 1 and Tier 2, when available
Version 1.0.22¶
- Internal improvements
Version 1.0.21¶
- Added client taxonomy overlay capabilities
- Added IAB Taxonomy overlay as an available client addon
Version 1.0.20¶
- Improved performance of demo limits for new accounts
- Internal improvements in dataset migration and publication including
Version 1.0.19¶
- Added an “async” parameter to classify/ calls to block on classification. The result of the POST will be the actual classification results rather than a link to the result URI.
- Reject classify/url POSTs where the url being classified doesn’t provide an apporpriate content-type (‘text/html’, ‘text/xhtml’, ‘application/xhtml+xml’, ‘text/xml’, ‘application/xml’)
- Reject classify/url POSTs where the url being classified is too large (content-length >= 256000 bytes)
- Fixed an issue with classify/* results being lost occasionally
Version 1.0.18¶
- Added an eContext Plugin to Google Translate API
- Added a check to avoid translation of content if it is determined to be in English
Version 1.0.17¶
- Added /categories/tiers to show all top-tier categories in the eContext Taxonomy
- Added ability to perform automatic content translation prior to classification using a bring-your-own translation service - currently only Microsoft Translator API
- Added general Category statistics including Social IDF (Inverse Document Frequency) and Social Relevance
- Deprecated /classify/twitter - these calls should be handled by /classify/social
Notes¶
Unless otherwise specified, all examples in this documentation use a Content-Type (RFC 2616#section-14.17) of JSON for both input and output.