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

Examples

Here are some examples of language identification using MeaningCloud:

Extract the language detected in a text

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

"New research finds that live music played for premature babies can be beneficial, calming their heart rate and breathing, and helping their sleep and sucking ability."

  • Use the txt parameter to submit the text.
  • Include your MeaningCloud license key as value for key parameter
Example using curl
curl -XPOST "http://api.meaningcloud.com/lang-2.0?key=<<YOUR OWN KEY>>&txt=New%20research%20finds%20that%20live%20music%20played%20for%20premature%20babies%20can%20be%20beneficial,%20calming%20their%20heart%20rate%20and%20breathing,%20and%20helping%20their%20sleep%20and%20sucking%20ability."
MeaningCloud API output
{
  "status": {
    "code": "0",
    "msg": "OK",
    "credits": "1"
  },
  "language_list": [
    {
      "language": "en",
      "relevance": "100",
      "name": "English",
      "iso639-3": "eng",
      "iso639-2": "en"
    }
  ]
}

Example with a text written in Spanish

"El tenista consiguió una remontada espectacular sobre su rival, demostrando una vez más, que está recuperado de la lesión que lo apartó durante meses del circuito de la ATP."

Example using curl
curl -XPOST "http://api.meaningcloud.com/lang-2.0?key=<<YOUR OWN KEY>>&txt=El%20tenista%20consigui%C3%B3%20una%20remontada%20espectacular%20sobre%20su%20rival%2C%20demostrando%20una%20vez%20m%C3%A1s%2C%20que%20est%C3%A1%20recuperado%20de%20la%20lesi%C3%B3n%20que%20lo%20apart%C3%B3%20durante%20meses%20del%20circuito%20de%20la%20ATP.&verbose=y"
MeaningCloud API output
{
  "status": {
    "code": "0",
    "msg": "OK",
    "credits": "1"
  },
  "language_list": [
    {
      "language": "es",
      "relevance": "100",
      "name": "Spanish",
      "iso639-3": "spa",
      "iso639-2": "es",
      "script": "Latin",
      "speakers": "332000000"
    }
  ]
}