The XTAG Tutorial

Location of this page:

All the material presented in the XTAG tutorial is available at

The XTAG Homepage

The XTAG homepage is at

It contains the following stuff:

Guide for Using XTAG

This guide is meant to help you explore XTAG on your own. It points various basic and more advanced ways of using XTAG to explore and work with the English grammar.

*General point*: the NCDs have limited video memory, so do not open too many trees at once, or display all features on large trees.

Getting Set Up

  1. Login to linc.cis or unagi.cis. You will need an account on either of these machines to run XTAG.
  2. cd /mnt/linc/xtag2/pub/bin
  3. Run Xtag (type "Xtag" at the command line)
  4. Load english.gram (menu "Grammar", choose "load grammar", type /mnt/linc/xtag2/pub/english/english.gram)
  5. Load the morphological db ("Tools", "xmdbm window")
  6. Load the syntactic db ("Tools","xsyn window")
  7. Collapse all buffers ("Buffers", "collapse all buffers")


  1. Look at Tnx0Vnx1 family in xsyn ("Add Family to List", "Select from list", "Search") and tree buffer in XTAG (right mouse at buffer, "expand tree list"; to see a tree, choose "DISPLAY" next to the tree name).
  2. Try various buffer activities. *Use the RIGHT button to get the menu for nodes in a tree!!*
  3. The secret of the scrolling web (how not to get trapped): use the scroll web to scroll around a tree (the different mouse buttons scroll at different speeds); if you get stuck in the web (you will know), click on the web, drag out of the web window, and THEN lift the mouse button.
  4. Open parser window ("Parsing", "show parser input window"); set parser to show derived trees automatically ("Parsing", "show derived trees").
  5. Parse the following sentences from the tutorial:

More Advanced

  1. Parse "Neptune is holding a trident"; look at the derivation tree.
  2. Show-entry for "holding/N"; show-entry for "holding/V"; show-entry for "holding_nx0Vnx1".
  3. Do a show-entry for other words in "Neptune is holding a trident". Using the derivation tree obtained in (13) as a guide, display the appropriate component trees from the buffers created for each word.
  4. Use the "copy subtree" (at the root menu of the tree) and "substitute" and "adjoin" commands (at the appropriate nodes) to create a derivation by hand for the sentence in (13). Choose "unify all top/bottom" from the "Tree" menu to unify the features in your hand-built derivation.
  5. Parse "Neptune is holding a trident"
  6. Replace a word in the sentence with any nonsense word (make sure the POS tagger tags it correctly!) to see the defaults in action.
  7. Turn the tagger back on; change parse category to NP ("Parsing", "parse input as NP"; parse "the warden"; parse as NP "the warden who discovered the gunpowder".


Help via Email

As a last resort you can send email for help with problems in using XTAG. To send email you will have to visit this page at using a web browser.