linux/unices:
java -Xmx256M -classpath ./grammarbrowser.jar:./lib/stanford-parser.jar grammarbrowser.browser.Browser [parameters]
windows:
java -Xmx256M -classpath ./grammarbrowser.jar;./lib/stanford-parser.jar grammarbrowser.browser.Browser [parameters]
Note the -Xmx256M parameter sets the JVM memory heap to 256 mega bytes, which may suffice or not depending on analyzed data. It may also stretch the memory requirements too much on some hosts.
Command line parameters
doc=[path/to/text/doc]
grammar=[path/to/serialized/grammar/file]
laf=[com.incors.plaf.kunststoff.KunststoffLookAndFeel|com.jgoodies.looks.plastic.PlasticLookAndFeel|com.jgoodies.looks.windows.WindowsLookAndFeel|com.sun.java.swing.plaf.windows.WindowsLookAndFeel]
theme=[true|false]
Links
Diff
Some of the Stanford 1.6 distribution classes had to be patched (the patched file are to be found in the grammarbrowser.jar, please note the classpath order on the command line is relevant for the patched classes to override the standard ones):
-
edu/stanford/nlp/parser/ui/TreeJPanel
- antialiasing rendering
- font selection and size computation made public so that wrapping components can size accordingly and not the other way around
-
edu/stanford/nlp/trees/GrammaticalRelation.java
- made members protected or accessible so that a MutableGrammaticalRelation (=editable) can be derived
-
edu/stanford/nlp/trees/tregex/TregexParser.java
- bug fixed (parser did not recover well after negation-involving parse errors)
License