|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--RecognizerPanel
this class builts the window for comparing two turns of the dialogue with respect to the recognized words
Field Summary | |
(package private) javax.swing.text.SimpleAttributeSet |
black
|
(package private) javax.swing.text.SimpleAttributeSet |
blue
|
(package private) javax.swing.JButton |
compare
|
(package private) javax.swing.JDialog |
dialog
|
(package private) javax.swing.JButton |
dismiss
|
(package private) javax.swing.text.DefaultStyledDocument |
doc
|
(package private) javax.swing.text.DefaultStyledDocument |
doc1
|
(package private) java.lang.String |
in
the input string |
(package private) java.lang.String[] |
InWords
array of strings containing the words in the iput string |
(package private) javax.swing.JFrame |
mainframe
|
(package private) javax.swing.JTextPane |
orig
|
(package private) java.lang.String |
orig_in
|
(package private) java.lang.String |
orig_rec
|
(package private) java.lang.String |
rec
the recognized string |
(package private) javax.swing.JTextPane |
recognized
|
(package private) java.lang.String[] |
RecWords
array of strings containing the words in the recognized string |
(package private) javax.swing.text.SimpleAttributeSet |
red
|
(package private) UserInterface |
ui
|
Fields inherited from interface UserOptions |
DEFAULTSFILENAME,
FREQUENCY_SAVE_TURNS,
MAXIMUM_WORDS_STRING,
NO_TURNS,
REPLACEMASKSIZE,
TRANSLATION_SEGMENTS |
Constructor Summary | |
RecognizerPanel(javax.swing.JFrame mainframe,
UserInterface ui)
|
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
define the actions on the buttons |
void |
changed(Judgements j)
fires changes in the main document |
void |
compare_algorithm()
|
private java.lang.String |
DeleteDotsAndCommas(java.lang.String a_string)
deletes from a string all punctuation signs |
private int |
detect(java.lang.String s,
java.lang.String[] v)
detects if a string is contained in an array of strings ignoring the Upper or Lower cases |
private boolean |
find_pos(int s,
int[] v)
checks the appartenence of a number to a vector of integers |
javax.swing.JDialog |
getTranslationDialog()
|
private void |
highlightWordsInput(int[][] s)
highlits the not recognized words in the input string |
private void |
highlightWordsOutput(int[][] s)
highlights the not recognized words in the output string |
void |
initial_state()
|
private boolean |
isDotOrComma(char a_char,
java.lang.String s,
int i)
checks if a character is a punctuation sign |
int |
isRecognitionPerfect(Judgements judgement)
bulits the arrays of strings of recognized words and checks if the strings were perfect recognized |
void |
ShowDialog()
pops-up the window |
Methods inherited from class java.lang.Object |
|
Field Detail |
javax.swing.JDialog dialog
javax.swing.JTextPane orig
javax.swing.JTextPane recognized
javax.swing.JFrame mainframe
UserInterface ui
javax.swing.JButton dismiss
javax.swing.JButton compare
java.lang.String[] InWords
java.lang.String[] RecWords
java.lang.String in
java.lang.String rec
java.lang.String orig_in
java.lang.String orig_rec
javax.swing.text.DefaultStyledDocument doc
javax.swing.text.DefaultStyledDocument doc1
javax.swing.text.SimpleAttributeSet red
javax.swing.text.SimpleAttributeSet black
javax.swing.text.SimpleAttributeSet blue
Constructor Detail |
public RecognizerPanel(javax.swing.JFrame mainframe, UserInterface ui)
Method Detail |
public void ShowDialog()
public void initial_state()
public void actionPerformed(java.awt.event.ActionEvent e)
StringCompare.assignClasses()
,
StringCompare.result()
,
isRecognitionPerfect(Judgements)
public void compare_algorithm()
private void highlightWordsInput(int[][] s)
s
- is the matrix provided by the String compare algorithmprivate void highlightWordsOutput(int[][] s)
private boolean find_pos(int s, int[] v)
private int detect(java.lang.String s, java.lang.String[] v)
public javax.swing.JDialog getTranslationDialog()
public void changed(Judgements j)
public int isRecognitionPerfect(Judgements judgement)
judgement
- the turnprivate java.lang.String DeleteDotsAndCommas(java.lang.String a_string)
a_string
- the string to be changedprivate boolean isDotOrComma(char a_char, java.lang.String s, int i)
a_char
- the char to be checkeds
- the string to which the char belongsi
- the position in s where the char appears
return true if the character is a punctuation sign
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |