Ontology Classifier

Classify any text against NOSIBLE's ontologies in the exact shape of a World event's ontologies, so it compares directly with an event.

Explanation

Labels a text against NOSIBLE's ontologies in the exact shape of a World V2.0 event's ontologies list, using the same classifier and the same 0.5 probability rule. Use it to classify text from outside the World archive, such as a headline or a paragraph, so it compares directly with an event.

POST/api/v2.0/models/ontology

Request

Authorizations

Bearer

Body

application/json
textstringrequiredbody

Text to classify. Maximum 50,000 characters.

Example: Microsoft completed its acquisition of Activision Blizzard after regulators approved the deal.

Response

Response body

application/json

These are the fields you can build against. Nested names use dot notation; optional sections are called out in their descriptions.

schemastring

Response schema of the V2.0 Ontology Classifier.

Example: nosible_model_ontologies_v2

modelstring

Pinned classifier name, version, and immutable build identifier: the classifier that labels V2.0 events.

Example: NOSIBLE/ontology-classifier-v2.0-preview@sha256:49b2ce9a6743b6b98f1428a392198f03e2b7a0dac3cac5fa3f0014b2149bfd54

textstring

The exact input text classified by the model.

Example: Microsoft completed its acquisition of Activision Blizzard after regulators approved the deal.

ontologiesobject[]

Labels with a probability of at least 0.5, highest first, in the shape of a V2.0 event's ontologies field.

Example: [{ "ontology": "media_frame", "label": "Economic Consequences", "probability": 0.9147 }]

ontologies[].ontologystring

Family, named as in V2.0 events: asset_class, ekman7_emotion, emdat, gics, iab, icd11, iptc_genre, iptc_media_topics, media_frame, mitre_attack, nosible, plover, schema_org_event, sdgs, or sportsml.

Example: gics

ontologies[].probabilitynumber

Classifier probability, rounded to four decimal places; always 0.5 or more.

Example: 0.514

ontologies[].<level>string

The label's levels, named by family: iab tier_1 to tier_4; gics sector, industry_group, industry, sub_industry; nosible category, subcategory, event; asset_class main_class, sub_class; emdat disaster_group, disaster_subgroup, disaster_type; iptc_media_topics level_1 to level_3; mitre_attack tactic, technique, subtechnique; icd11 chapter, block; sdgs goal, target; plover event, mode, context; sportsml sport or event_type; media_frame, ekman7_emotion, iptc_genre and schema_org_event label. Levels the label does not reach are omitted.

Example: Communication Services

Responses and errors

HTTP
200Request succeeded. The body is shown in the response example.
400invalid_request — The request is syntactically valid JSON but a value, date, filter, or combination of fields is invalid.
401unauthorized — The required API key or Bearer credential is missing or invalid.
422validation_error — The request shape is understood but one or more values fail validation.
429rate_limited — The request exceeded the account or public-window rate limit. Respect Retry-After when supplied.
502upstream_error — An upstream retrieval service failed while processing the request.
504upstream_timeout — An upstream retrieval service did not respond within the request timeout.