Do you have any questions? Just write us an email or ask us through the feedback section.

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 -XPOST "https://api.meaningcloud.com/class-1.1?key=<<YOUR OWN KEY>>&of=json&txt=The%2085th%20Academy%20Awards%20ceremony%20took%20place%20February%2024,%202013.&model=IPTC_en"
MeaningCloud API output
{
    "status": {
    	"code": "0",
        "msg": "OK",
        "credits": "5"
    },
    "category_list": [
        {
            "code": "01021001",
            "label": "arts, culture and entertainment - entertainment (general) - entertainment award",
            "abs_relevance": "0.48236102",
            "relevance": "100"
        },
        {
            "code": "08006000",
            "label": "human interest - award and prize",
            "abs_relevance": "0.28744578",
            "relevance": "60"
        }
    ]
}

Classify an Spanish online article into reputation dimensions (BusinessRep_es)

Classify an online document (URL) into reputation dimensions, for instance this news article.

  • Use the url parameter to submit the document by URL.
  • Select value BusinessRep_es as the value for the model parameter to use the Business reputation model in Spanish
  • 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 -XPOST "https://api.meaningcloud.com/class-1.1?key=<<YOUR OWN KEY>>&of=json&url=http://cincodias.com/cincodias/2014/09/19/empresas/1411104892_973086.html&model=BusinessRep_es"
MeaningCloud API output
{
    "status": {
        "code": "0",
        "msg": "OK",
        "credits": "129"
    },
    "category_list": [
        {
            "code": "62",
            "label": "Responsabilidad social - Apoyo de causas sociales",
            "abs_relevance": "0.59809214",
            "relevance": "100"
        }
    ]
}