I'm working with a set of texts and I want to discover the ocurrence of some terms that indicate that this text refers to a certain topic.
The term is "council" and I created an R object containing all the ocurrences of "council" + 5 following words / punctuation. I want now to "clean" this objects, retrieving only the terms that ocurr frequently.
This would be something like this:
terms <- c("council of the city of Chicago", "council of the city. The other", "council to request a approval of", "council of public policies to deal", "council of public policies in order")
# RESULT
# council
# council of the city
# council of public policies
It is important to mantion that my real object is way bigger than that and I don't know beforehand all the possibilities that might appear after the word "council".
Thanks for the help =)