Juno's Presentation Outline 1. Unzip/untar files 2. testparser - to see demonstration of the SyntacticParser and its output 3. Purpose - visualization of parse tree - a didactic tool - instructional as well as practical - also provides methods for creating/modifying grammar and lexicon 4. load textbook grammar and lexicon (textbook.grammar) - view textbook (Jurafsky/Martin) ch. 10 CFG - a default grammar has been loaded already 4. open corpus - notice empty - no corpus has been loaded yet 5. Load local file - textbook.txt - view the corpus - you can click on any sentence in the corpus view to jump to it - also provides functions for modifying and parsing 6. parse interface - back and forth through sentences - up and down through parses - reparse same as parse in corpus view - before going on to box/tree view - parse the sentence and traverse the parses - you'll notice first sentence just shows blue boxes for the original sentence - this is always the case: - top is original - lexemes are blue-colored - now go down the list to the bracket-notated parse - you will see the parse tree in the graphic view - this can also be viewed in box view by clicking on box view - notice it toggles between Box and Tree View, and the current view is always shown on the status bar on the bottom 7. graphical view - is hyperlinked - click on a node - and you will see either the grammar editor or lexicon editor update its selection to what was just selected - terminal nodes (lexemes) or the parent of the terminal node (POS) will update the lexicon editor - all other nodes will update the grammar editor to the corresponding definition 8. lexicon editor - go to "book the book" example for demonstration of modifying the lexicon - click on one of the "book" nodes and the lexicon editor will update to select book and show its two different POS - now if we were to remove one of these POS, then the sentence shouldn't be able to parse. So - click on a POS - delete POS - then reparse on the parse interface - you'll see no parse, just the original sent - now retype the POS you deleted in the text field and add POS. - now reparse to see the parse again 9. grammar editor - click on parse tree - root S - S > VP should highlight - S > VP - delete and try to parse - should show nothing - retype the definition, the S on the left textfield and the VP on the right. (it's not case sensitive so you could type it all lowercase- the program will convert it to uppercase) and Add the definition - reparse and you should see the parse tree show up again. 10. History Cache - Now, to demonstrate more complex sentences as well as the history cache, click on History - opens a list of all previously viewed corpii - these have been saved to a cache directory - with any previous parses on them saved as well - there is a limit you can set to the number of files that are saved. I'll show you how to do that later. - the top URL in the list is the most previously loaded. The lower URLs are more recent. - now click on the URL ending in sample.txt - since your computer has a different local file hierarchy than mine, you would think that clicking on this would cause an error, but this is not the case, since the file itself is now located in the cache directory. - you should see the textbook.txt file that you just viewed show up in the list and the entry disappear from the history window - the current corpus is always saved automatically to the cache when either - the user loads another corpus - or the user shuts down the program 11. Loading + Saving Grammar - similarly, we can load up new grammar definitions which we will need to do for the extra.input corpus we just loaded - - go to file and Load Grammar - the previous grammar will be saved automatically before the new one is loaded - you could have also saved the previous grammar under a different name using the Save Grammar option under the File menu. 12. View the more complex sentences - parse and view - print function - will print the tree or box image of the parse to your printer. - to do this - it will automatically set some options on the graphic view - - limiting its dimensions - setting render to fixed-size instead of auto. Depends on pixel dimensions your printer is set up for. 13. Preferences Editor - the preference editor gives you the option to set this as well as other options. - click on prefs - set initial grammar, corpus - set history cache size and whether it goes indefinitely - set graphical view to either fixed size to specified dims or to auto (which is the default) - set maximum depth of the search tree (the max depth is necessary if we want to avoid the problems of infinite recursion) - auto-parse - when checked, sentences will be automatically parsed upon user selection in the parse interface. If not, the user will have to click on Reparse 14. Tutorial - finally, the Tutorial - is available under Help -> Tutorial - as well as the URL http://www.cs.columbia.edu/~sjuno/nlp-project/ Questions? The End.