Show the structure of s-attributes. If x is a subcorpus, the s-attribute
used for corpus subsetting is highlighted.
tree_structure(x, ...)
# S4 method for class 'xml_node'
tree_structure(x, s_attribute = NULL, prefix = 0, indent = 3, root = TRUE)
# S4 method for class 'xml_document'
tree_structure(x, s_attribute = NULL, prefix = 0, indent = 3, root = TRUE)
# S4 method for class 'subcorpus'
tree_structure(x)
# S4 method for class 'corpus'
tree_structure(x, s_attribute = NULL)xml_sample <- system.file(
package = "GermaParl2",
"extdata", "cwb", "indexed_corpora",
"germaparl2mini"
)
if (nchar(xml_sample) > 0L && interactive()){
use(pkg = "GermaParl2", corpus = "GERMAPARL2MINI")
corpus("GERMAPARL2MINI") %>%
tree_structure()
corpus("GERMAPARL2MINI") %>%
subset(speaker_name == "Konrad Adenauer") %>%
tree_structure()
corpus("GERMAPARL2MINI") %>%
subset(speaker_name == "Konrad Adenauer") %>%
subset(p) %>%
tree_structure()
corpus("GERMAPARL2MINI") %>%
subset(ne_type) %>%
tree_structure()
}