I would like to use R to search a text for patterns expressed through a mix of POS and actual strings. (I have seen this functionality in a python library here: http://www.clips.ua.ac.be/pages/pattern-search).
For instance, a search pattern could be: 'NOUNPHRASE be|is|was ADJECTIVE than NOUNPHRASE'
, and should return all strings containing structures like: "a cat is faster than a dog".
I know that packages like openNLP
and qdap
offer convenient POS-tagging. Has anyone been using the output of it for this kind of pattern maching ?