|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
edu.stanford.nlp.parser.ui.ParserPanel
public class ParserPanel
Provides a simple GUI Panel for Parsing. Allows a user to load a parser created using lexparser.LexicalizedParser, load a text data file or type in text, parse sentences within the input text, and view the resultant parse tree.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
static int |
TOKENIZED_CHINESE
|
static int |
UNTOKENIZED_CHINESE
|
static int |
UNTOKENIZED_ENGLISH
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ParserPanel()
Creates new form ParserPanel |
Method Summary | |
---|---|
void |
loadFile()
Opens dialog to load a text data file |
void |
loadFile(String filename)
Loads a text or html file from a file path or URL. |
void |
loadParser()
Opens dialog to load a serialized parser |
void |
loadParser(String filename)
Loads a serialized parser specified by given path |
void |
parse()
Tokenizes the highlighted text (using a tokenizer appropriate for the selected language, and initiates the ParseThread to parse the tokenized text. |
void |
scrollBack()
Scrolls back one sentence in the text |
void |
scrollForward()
Scrolls forward one sentence in the text |
void |
setLanguage(int language)
Sets the language used by the ParserPanel to tokenize, parse, and display sentences. |
void |
setStatus(String status)
Sets the status text at the bottom of the ParserPanel. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int UNTOKENIZED_ENGLISH
public static final int TOKENIZED_CHINESE
public static final int UNTOKENIZED_CHINESE
Constructor Detail |
---|
public ParserPanel()
Method Detail |
---|
public void scrollBack()
public void scrollForward()
public void setStatus(String status)
public void setLanguage(int language)
language
- One of several predefined language codes. e.g.
UNTOKENIZED_ENGLISH, TOKENIZED_CHINESE, etc.public void parse()
public void loadFile()
public void loadFile(String filename)
public void loadParser()
public void loadParser(String filename)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |