Tgrep2 Tutorial

…so that you see the forest for the trees


This tutorial will provide you with technical help to problems and questions that you will probably encounter during your seminar on English Grammar and its Representation in Treebanks. It also provides you with general help on working with TGrep2. This tutorial is intended to be an addition to the seminar and not as a replacement, you will of course still need to attend your lessons.

Closely related to the seminar, this tutorial follows the same structure.

  • At first you will encounter Labelled Bracketing, a machine-readable form to represent a sentence structure tree — as opposed to the structure trees you are used to draw, computers cannot deal with them so easily.
  • Then you will face the power (and sometimes the frustration) of Regular Expressions. They may take some time to get used to, but — as mentioned before — can be very powerful and actually help you find your query.
  • You will proceed to the tenor of the seminar: working with TGrep2, where you combine your knowledge on labelled bracketing and regular expressions and actually query TGrep2 to search for grammatical structures. To form such a complex query Basic Links are essential. For some advanced queries a look at Boolean Expressions can be useful, too.
  • Next you will find help for formulating a query and for occasions when your query does not return the results you are looking for. You can read about the Basic Approach and there is one authentic example on passive (with queries for both the Penn Treebank and the SUSANNE Corpus).
  • And finally we have put together the complete tagsets for both The Penn Treebank and The SUSANNE Corpus. They can save you quite some time of preparing your homework. Additionally you will find some links for further reading.

If you do not know where to find your information use the search function above the navigation on the right. It will list you all documents of this tutorial that contain your search term.

Keep in mind that this tutorial provides for the most part technical help, like regular expressions, basic links, explanation of the tagsets (Penn and SUSANNE) and so on. The grammatical part will be presented to you in the seminar. If you need help on grammatical features ask in your seminar.

This tutorial was first published in 2007 at as an e-learning resource for students of the seminar English Grammar and its Representation in Treebanks in Münster. But since the original document is missing some images and I do not have access to the server I decided to move it to this site.
This tutorial is the result of a group work between B. Hellmich, J. Piontek and E. Rupppert.