Description Usage Arguments Value See Also Examples
Given input text, returns a probability distribution over 33 possible languages of what language the text was written in.
1 |
text |
text for analysis |
version |
for api version |
... |
additional arguments to passed to request |
List with language probability pairs
1 2 3 4 5 6 7 8 | languages <- language("Monday: Delightful with mostly sunny skies.
Highs in the low 70s.")
languages
most.possible <- sort(unlist(languages), decreasing = TRUE)[1:2]
cat(sprintf("Detected %s language with probability %0.4f.\n",
names(most.possible)[1], most.possible[1]))
cat(sprintf("Next possible is %s with probability %0.4f.",
names(most.possible)[2], most.possible[2]))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.