Examples

Here are some examples of topics analysis using MeaningCloud API:

Extract all the possible topics of a text.

To show how to extract the topics we will use the following text as an example:

"Robert Downey Jr has topped Forbes magazine's annual list of the highest paid actors for the second year in a row. The 49-year-old star of the Iron Man and Avengers films made an estimated $75m over the past year, beating rivals Dwayne Johnson, Bradley Cooper, Chris Hemsworth and Leonardo DiCaprio."

  • Use the txt parameter to submit the text.
  • Choose with lang the language in which the text is going to be analyzed, in this case English, en.
  • Select a as the value for the tt parameter to extract all the possible topics.
  • Include your MeaningCloud license key as value for key parameter.
  • Change the default value of the unknown words parameter, uw so the engine tries to find possible analysis when there are typos in the text.
Example using curl:
curl 'https://api.meaningcloud.com/topics-2.0' \
  -F 'key=YOUR API KEY' \
  -F 'lang=en' \
  -F 'tt=a' \
  -F 'uw=y' \    
  -F 'txt=Robert Downey Jr has topped Forbes magazine\'s annual list of the highest paid actors for the second year in a row. The 49-year-old star of the Iron Man and Avengers films made an estimated \$75m over the past year, beating rivals Dwayne Johnson, Bradley Cooper, Chris Hemsworth and Leonardo DiCaprio.'
MeaningCloud API output:
{
"status":{
"code":
"0"
"msg":
"OK"
"credits":
"1"
}
"entity_list":[
0:{
"form":
"Robert Downey Jr"
"id":
"__12123288058840445720"
"sementity":{
...
}
"variant_list":[
...
]
"relevance":
"100"
}
1:{
"form":
"Forbes"
"id":
"db0f9829ff"
"sementity":{
...
}
"semgeo_list":[
...
]
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
2:{
"form":
"Iron Man"
"id":
"529e97f38e"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
3:{
"form":
"Dwayne Johnson"
"id":
"__4280586672389134159"
"sementity":{
...
}
"variant_list":[
...
]
"relevance":
"100"
}
4:{
"form":
"Bradley Cooper"
"official_form":
"Bradley Charles Cooper"
"id":
"3e7c9ae34b"
"sementity":{
...
}
"semgeo_list":[
...
]
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
5:{
"form":
"Chris Hemsworth"
"id":
"b2e6c3b771"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
6:{
"form":
"Leonardo DiCaprio"
"id":
"8119b88b6d"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
]
"concept_list":[
0:{
"form":
"magazine"
"id":
"a0a1a5401f"
"sementity":{
...
}
"semld_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
1:{
"form":
"actor"
"id":
"99e6d7a3f6"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
2:{
"form":
"star"
"id":
"35d8a8e65d"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
3:{
"form":
"star"
"id":
"c5994b45cc"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
4:{
"form":
"avenger"
"id":
"65fdadcbff"
"sementity":{
...
}
"semld_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
5:{
"form":
"film"
"id":
"4e7e3490af"
"sementity":{
...
}
"semld_list":[
...
]
"semtheme_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
6:{
"form":
"dollar"
"official_form":
"United States dollar"
"id":
"7b6858c50a"
"sementity":{
...
}
"semgeo_list":[
...
]
"semld_list":[
...
]
"semtheme_list":[
...
]
"standard_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
7:{
"form":
"opponent"
"id":
"d556261ad1"
"sementity":{
...
}
"semld_list":[
...
]
"variant_list":[
...
]
"relevance":
"100"
}
]
"time_expression_list":[
]
"money_expression_list":[
0:{
"form":
"$75m"
"amount_form":
"75m"
"numeric_value":
"7.5e+07"
"currency":
"USD"
"inip":
"189"
"endp":
"192"
}
]
"quantity_expression_list":[
]
"other_expression_list":[
]
"quotation_list":[
]
"relation_list":[
0:{
"form":
"The 49-year-old star of the Iron Man and Avengers films made an estimated $75m over the past year, beating rivals Dwayne Johnson, Bradley Cooper, Chris Hemsworth and Leonardo DiCaprio."
"inip":
"115"
"endp":
"297"
"subject":{
...
}
"verb":{
...
}
"complement_list":[
]
"degree":
"1"
}
1:{
"form":
"Robert Downey Jr has topped Forbes magazine's annual list of the highest paid actors for the second year in a row."
"inip":
"0"
"endp":
"112"
"subject":{
...
}
"verb":{
...
}
"complement_list":[
...
]
"degree":
"1"
}
2:{
"form":
"The 49-year-old star of the Iron Man and Avengers films made an estimated $75m over the past year, beating rivals Dwayne Johnson, Bradley Cooper, Chris Hemsworth and Leonardo DiCaprio."
"inip":
"115"
"endp":
"297"
"subject":{
...
}
"verb":{
...
}
"complement_list":[
...
]
"degree":
"1"
}
]
}