An introdution to Gsearch
By Susanne Riehemann (ed. by Florian Jaeger): Gsearch allows syntactic pattern matching over tagged corpora. It can be set up to tag corpora on the fly, by calling out to some tagging program, though this page does not contain information on this (if you happen to have experience with this, please contact the Corpus TA. The instructions on this page are based on the assumption that you use a Sun machine (i.e. a Leland machine, or a CSLI/ling one).
For more detailed information than given on this page, you can find documentation at:
Getting startedFirst, make sure you have the following included in your PATH variable ('echo $PATH' shows you what is included in your PATH):
You can do this by typing (which will append the above-mentioned path to your PATH variable):
Corpora available for Gsearch
Next, to know the corpora names you will need for your search, have a look at the following file in which they are defined:
However, note that I just quickly edited it to get a few things working. Not everything defined there exists or works. These ones currently do:
To search for a word:
Examples for searches
To search for a tagged word, here 'butter' as a verb (note: BNC uses a different tag set to UPenn stuff):
To search for more than a word or tag, you need a grammar. There are some sample ones in:
Here is an example of a search using a the grammar in GrammarBNC in which the search pattern given below is defined (including the pps). The search looks for show as a noun with 2 prepositional phrases (pps) after it (the command line is one line):
You will notice that the search is nothing else but pattern matching. It isn't doing any disambiguation, and so for the above example the PPs in the output of the search aren't actually modifying show but something else. C'est la vie.
Note that gsearch corpora aren't pre-indexed, it's actually searching through a gigabyte of data exhaustively if you search the whole BNC. So expect it to take a while.