# NOT RUN {
tokens = tokens_spacy
## two simple example tqueries
passive = tquery(pos = "VERB*", label = "predicate",
children(relation = c("agent"), label = "subject"))
active = tquery(pos = "VERB*", label = "predicate",
children(relation = c("nsubj", "nsubjpass"), label = "subject"))
# }
# NOT RUN {
tokens = annotate_tqueries(tokens, 'clause', pas=passive, act=active)
syntax_reader(tokens, annotation = 'clause', value = 'subject')
# }
Run the code above in your browser using DataLab