Returns morphological analysis of input. The response may include lemmas, part of speech tags, compound word components, and Han readings. Support for specific return types depends on language.

ros_morph(content, feature = c("complete", "lemmas", "parts-of-speech",
  "compound-components", "han-readings"), genre = NULL, language = NULL)

Arguments

content
either a URI or character vector of content to process
feature
one of "complete", "lemmas", "parts-of-speech", "compound-components", or "han-readings". Defaults to "complete"
genre
document genre (optional)
language
Language: ISO 639-3 code (optional)

Examples

ros_morph("The quick brown fox jumped over the lazy dog. Yes he did.")
#> $tokens #> [1] "The" "quick" "brown" "fox" "jumped" "over" "the" "lazy" #> [9] "dog" "." "Yes" "he" "did" "." #> #> $posTags #> [1] "DET" "ADJ" "ADJ" "NOUN" "VERB" "ADP" "DET" "ADJ" "NOUN" #> [10] "PUNCT" "VERB" "PRON" "VERB" "PUNCT" #> #> $lemmas #> [1] "the" "quick" "brown" "fox" "jump" "over" "the" "lazy" "dog" #> [10] "." "yes" "he" "do" "." #> #> $compoundComponents #> [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA #> #> $hanReadings #> [1] NA NA NA NA NA NA NA NA NA NA NA NA NA NA #> #>
ros_morph("The quick brown fox jumped over the lazy dog. Yes he did.", "parts-of-speech")
#> $tokens #> [1] "The" "quick" "brown" "fox" "jumped" "over" "the" "lazy" #> [9] "dog" "." "Yes" "he" "did" "." #> #> $posTags #> [1] "DET" "ADJ" "ADJ" "NOUN" "VERB" "ADP" "DET" "ADJ" "NOUN" #> [10] "PUNCT" "VERB" "PRON" "VERB" "PUNCT" #> #>