Examples

Here are some examples of text categorization using MeaningCloud API:

Classify a text using IPTC Subject Codes in English (IPTC_en)

To obtain the subject categories for a short text like the following:

"The 85th Academy Awards ceremony took place February 24, 2013."

  • Use the txt parameter to submit the text.
  • Select value IPTC_en as the value for the model parameter to use IPTC classfication model in English
  • Include your MeaningCloud license key as value for key parameter
  • Choose an output format, for instance json as value for of
Example using curl:
curl 'https://api.meaningcloud.com/class-2.0' \
  -F 'key=YOUR API KEY' \
  -F 'model=IPTC_en' \
  -F 'txt=The 85th Academy Awards ceremony took place February 24, 2013.'
MeaningCloud API output:
{
"status":{
"code":
"0"
"msg":
"OK"
"credits":
"5"
}
"category_list":[
0:{
"code":
"01021001"
"label":
"arts, culture and entertainment - entertainment (general) - entertainment award"
"abs_relevance":
"0.48236102"
"relevance":
"100"
}
1:{
"code":
"08006000"
"label":
"human interest - award and prize"
"abs_relevance":
"0.28744578"
"relevance":
"60"
}
]
}