The XTAG Tutorial
Location of this page: http://www.cis.upenn.edu/~xtag/tutorialhandout.html
All the material presented in the XTAG tutorial is available at http://www.cis.upenn.edu/~xtag/tutorial.html
.
The XTAG Homepage
The XTAG homepage is at http://www.cis.upenn.edu/~xtag/
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
- Login to
linc.cis
or unagi.cis
. You will need an account on either of these machines to run XTAG.
- cd /mnt/linc/xtag2/pub/bin
- Run Xtag (type "Xtag" at the command line)
- Load english.gram (menu "Grammar", choose "load grammar", type /mnt/linc/xtag2/pub/english/english.gram)
- Load the morphological db ("Tools", "xmdbm window")
- Load the syntactic db ("Tools","xsyn window")
- Collapse all buffers ("Buffers", "collapse all buffers")
Basics
- 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).
- Try various buffer activities. *Use the RIGHT button to get the menu for nodes in a tree!!*
- In a tree, look at the comments and features ("Tree", "show/hide comments", "show/hide features")
- In a tree, look at the features on a node (right mouse on node, "show feature")
- Collapse/expand buffers ("Buffers", "collapse/expand all buffers"; buffer menu, "collapse/expand tree list")
- 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.
- Open parser window ("Parsing", "show parser input window"); set parser to show derived trees automatically ("Parsing", "show derived trees").
- Parse the following sentences from the tutorial:
- "Maya knows that Bill admires Kiki"; expand buffer, display derived and derivation tree ("Derivation" button in derived tree, or "view derivation" from tree menu)
- "who does Maya think Bill likes"; you will get 2 derivations--what is the difference?
- "Kiki kicked the bucket"; look at the derivation trees; look at the syntactic entries for "kicked" ("Tools", "show-entry")
More Advanced
- Parse "Neptune is holding a trident"; look at the derivation tree.
- Show-entry for "holding/N"; show-entry for "holding/V"; show-entry for "holding_nx0Vnx1".
- 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.
- 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.
- Parse "Neptune is holding a trident"
- using supertagger ("SuperTag" button in Parser Input window)
- without tagger or supertagger ("Parsing", "toggle part of speech tagger"; look at morph to understand validity of spurious parses, e.g. "a" as N)
- Replace a word in the sentence with any nonsense word (make sure the POS tagger tags it correctly!) to see the defaults in action.
- 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".
Troubleshooting
- Check for upper/lowercase errors.
- Check to see if the tagger is off.
- Check the tagger output for errors.
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 http://www.cis.upenn.edu/~xtag/tutorialhandout.html using a web browser.