public class MSD
extends java.lang.Object
Related references include the following:
Example dialogue:
PROMPT>java MSD ? usage: java MSD [-m] [-a] [-er] where -m = output the MSD matrix -a = output the set of optimal alignments -er = output the error rate PROMPT>java MSD -m -a -er ============================ Minimum String Distance Demo ============================ Enter pairs of strings (^z to exit) golfers gofpiers MSD = 3 Error rate (old) = 37.5000% Error rate (new) = 36.3636% g o f p i e r s 0 1 2 3 4 5 6 7 8 g 1 0 1 2 3 4 5 6 7 o 2 1 0 1 2 3 4 5 6 l 3 2 1 1 2 3 4 5 6 f 4 3 2 1 2 3 4 5 6 e 5 4 3 2 2 3 3 4 5 r 6 5 4 3 3 3 4 3 4 s 7 6 5 4 4 4 4 4 3 Alignments: 4, mean size: 8.25 golf--ers go-fpiers golf-ers gofpiers gol-fers gofpiers go-lfers gofpiers -------------
Constructor and Description |
---|
MSD(java.lang.String s1Arg,
java.lang.String s2Arg)
Create an MSD object.
|
Modifier and Type | Method and Description |
---|---|
StringPair[] |
getAlignments()
Returns pairs of alignment strings for this MSD object's s1/s2 string pair.
|
double |
getErrorRate()
Return a double equal to the text entry error rate (%).
|
double |
getErrorRateNew()
Returns the new-and-improved measure for the MSD error rate.
|
int[][] |
getMatrix()
Returns the minimum string distance matrix.
|
int |
getMSD()
Return an integer equal to the minimum distance between two strings.
|
java.lang.String |
getS1()
Returns the S1 string
|
java.lang.String |
getS2()
Returns the S2 string
|
double |
meanAlignmentSize()
Returns the mean size of the alignment string as a double
|
public MSD(java.lang.String s1Arg, java.lang.String s2Arg)
s1Arg
- the 1st text string (the "presented" text)s2Arg
- the 2nd text string (the "transcribed" text)public int[][] getMatrix()
s1.length() + 1
. The number of columns is
s2.length() + 1
. The value of the minimum string distance statistic may be retrieved from
msdMatrix[s1.length()][s2.length()]
.
public int getMSD()
For details, see Soukoreff & MacKenzie (2001).
int
equal to the minimum string distance.public java.lang.String getS1()
public java.lang.String getS2()
public double getErrorRate()
public StringPair[] getAlignments()
StringPair
s containing pairs of alignment stringspublic double meanAlignmentSize()
public double getErrorRateNew()