*********************************************************** DATA: ----- The data is in grepable format cd /afs/cs.cmu.edu/academic/class/11722-s08/DATA/TREEBANK_3 MRG-BROWN Corpus is in: MRG/BROWN/BROWN.t2c MRG-WSJ Corpus is in: MRG/WSJ/WSJ.t2c MRG-SWBD Corpus is in: MRG/SWBD/SWBD.t2c MRG-ATIS Corpus is in: MRG/ATIS/ATIS.t2c PRD-BROWN Corpus is in: PRD/BROWN/BROWN.t2c PRD-WSJ Corpus is in: PRD/WSJ/WSJ.t2c PRD-SWBD Corpus is in: PRD/SWBD/SWBD.t2c PRD-ATIS Corpus is in: PRD/ATIS/ATIS.t2c *********************************************************** HOW TO RUN: ----------- Command line arguments: ./tgrep2 [options] .... enter /afs/cs.cmu.edu/academic/class/11722-s08/DATA/TREEBANK_3 directory (1)./tgrep2 -c MRG/BROWN/BROWN.t2c 'NP filename If you want to see only the terminal nodes of the tree, use: ./tgrep2 -t 'NP < VP' If you want to see the tree for the whole sentence in which the match occurred, use: ./tgrep2 -w 'NP < VP' If there are multiple matches for the pattern in a sentence, you can find them all with: ./tgrep2 -a 'NP < VP' These switches can be combined, e.g. if you want to see the whole sentence that was matched, use: ./tgrep2 -tw 'NP < VP' Multiple patterns, use: ./tgrep2 'NP < VP;NP B A is the child of B. A N B A is the Nth child of B (the first child is >1). A <, B Synonymous with A <1 B. A >, B Synonymous with A >1 B. A <-N B B is the Nth-to-last child of A (the last child is <-1). A >-N B A is the Nth-to-last child of B (the last child is >-1). A <- B B is the last child of A (synonymous with A <-1 B). A >- B A is the last child of B (synonymous with A >-1 B). A <` B B is the last child of A (also synonymous with A <-1 B). A >` B A is the last child of B (also synonymous with A >-1 B). A <: B B is the only child of A A >: B A is the only child of B A << B A dominates B (A is an ancestor of B). A >> B A is dominated by B (A is a descendant of B). A <<, B B is a left-most descendant of A. A >>, B A is a left-most descendant of B. A <<` B B is a right-most descendant of A. A >>` B A is a right-most descendant of B. A <<: B There is a single path of descent from A and B is on it. A >>: B There is a single path of descent from B and A is on it. A . B A immediately precedes B. A , B A immediately follows B. A .. B A precedes B. A ,, B A follows B. A $ B A is a sister of B (and A 6= B). A $. B A is a sister of and immediately precedes B. A $, B A is a sister of and immediately follows B. A $.. B A is a sister of and precedes B. A $,, B A is a sister of and follows B. A = B A is the same node as B (Link Modifiers).