Class StringCompare

java.lang.Object
  |
  +--StringCompare

public class StringCompare
extends java.lang.Object
implements UserOptions

this class implements the algorithm for comparing the number of words from a string recognized into another string

See Also:
UserOptions

Inner Class Summary
(package private)  class StringCompare.Element
           
(package private)  class StringCompare.QuickSort
           
 
Field Summary
(package private)  java.lang.String[] input
           
(package private)  StringCompare.Element[][] matrix
           
(package private)  int max_class
           
(package private)  int pos_max
          indicates the position of the word with the maximum class in the output string
(package private)  int[][] pos_rec
          records the positions where the common substring is retrieved it has 2 rows and an arbitrary number of columns up to 50 (which is the maximum length of the input string) pos[0] records the positions in the input string pos[1] records the positions in the output string
(package private)  java.lang.String[] rec
           
 
Fields inherited from interface UserOptions
DEFAULTSFILENAME, FREQUENCY_SAVE_TURNS, MAXIMUM_WORDS_STRING, NO_TURNS, REPLACEMASKSIZE, TRANSLATION_SEGMENTS
 
Constructor Summary
StringCompare(java.lang.String[] s1, java.lang.String[] s2)
           
 
Method Summary
 void assignClasses()
           
private  int maximum(int x, int y)
           
 void result()
           
private  int searchFirstElem(int x, int y)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

input

java.lang.String[] input

rec

java.lang.String[] rec

matrix

StringCompare.Element[][] matrix

max_class

int max_class

pos_max

int pos_max
indicates the position of the word with the maximum class in the output string

pos_rec

int[][] pos_rec
records the positions where the common substring is retrieved it has 2 rows and an arbitrary number of columns up to 50 (which is the maximum length of the input string) pos[0] records the positions in the input string pos[1] records the positions in the output string
Constructor Detail

StringCompare

public StringCompare(java.lang.String[] s1,
                     java.lang.String[] s2)
Method Detail

assignClasses

public void assignClasses()

searchFirstElem

private int searchFirstElem(int x,
                            int y)

maximum

private int maximum(int x,
                    int y)

result

public void result()