View source: R/get_translations.R
get_translation | R Documentation |
This will match up to 4 meanings where the requested word and part of speech match. The first 2 results from each meaning-set are returned, then the first four unique translations are selected. This means there is a fairly strong tendency towards the most common two or three synsets. For more information on synsets, see the Open Multilingual Wordnet documentation.
get_translation(token, part_of_speech, language = "jpn")
token |
an English word to pass to nltk's synset search |
part_of_speech |
one of "v" -verb, "a" - adjective, "n" - noun, or "r" - adverb |
language |
check the list of options with wordlists::ntlk_languages. Defaults to japanese |
a character vector of length one
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.