# \dontshow{
if(require(udpipe) && require(ggraph) && require(ggplot2) && require(igraph))
{
# }
library(udpipe)
library(ggraph)
library(ggplot2)
library(igraph)
# \donttest{
x <- udpipe("The economy is weak but the outlook is bright", "english")
textplot_dependencyparser(x)
x <- udpipe("His speech about marshmallows in New York is utter bullshit", "english")
textplot_dependencyparser(x, size = 4)
x <- udpipe("UDPipe provides tokenization, tagging, lemmatization and
dependency parsing of raw text", "english")
textplot_dependencyparser(x, size = 4)
# }
data("example_udpipe", package = "textplot")
textplot_dependencyparser(example_udpipe, size = 4)
# \dontshow{
}
# End of main if statement running only if the required packages are installed
# }
Run the code above in your browser using DataLab