# NOT RUN {
# call method on a connection
text_con <- file("~/my.data/tagged_speech.txt", "r")
tagged_results <- readTagged(text_con, lang="en")
close(text_con)
# call it on the file directly
tagged_results <- readTagged("~/my.data/tagged_speech.txt", lang="en")
# import the results of RDRPOSTagger, using the "manual" tagger feature
sample_text <- c("Dies ist ein kurzes Beispiel. Es ergibt wenig Sinn.")
tagger <- RDRPOSTagger::rdr_model(language="German", annotation="POS")
tagged_rdr <- RDRPOSTagger::rdr_pos(tagger, x=sample_text)
tagged_results <- readTagged(
tagged_rdr,
lang="de",
tagger="manual",
mtx_cols=c(token="token", tag="pos", lemma=NA)
)
# }
Run the code above in your browser using DataLab