4A Server -  2.0
 All Classes Namespaces Files Functions Variables Enumerator
cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod Class Reference

Compare class using Levenshtein approximate string matching method. More...

Inheritance diagram for cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod:
Inheritance graph
Collaboration diagram for cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod:
Collaboration graph

Public Member Functions

 LevenshteinMethod (double minimumPercentage)
 
void setMinimumPercentage (double minimumPercentage)
 
double getMinimumPercentage ()
 
boolean compare (String first, String second)
 
String toString ()
 
- Public Member Functions inherited from cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.CompareMethod
abstract boolean compare (String first, String second)
 

Static Private Member Functions

static int Minimum (int a, int b, int c)
 
static double similarity (String s, String t)
 

Private Attributes

double minimumPercentage
 

Detailed Description

Compare class using Levenshtein approximate string matching method.

Compare class using Levenshtein approximate string matching method

Author
Michael Angelov

Definition at line 23 of file LevenshteinMethod.java.

Constructor & Destructor Documentation

cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.LevenshteinMethod ( double  minimumPercentage)

Constructor

Parameters
minimumPercentageminimum similarity percentage condition that must be met for strings to match

Definition at line 32 of file LevenshteinMethod.java.

Member Function Documentation

boolean cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.compare ( String  first,
String  second 
)

Overriden compare() method

Parameters
firstfirst string to compare
secondsecond string to compare
Returns
true if strings match, false if don't

Definition at line 63 of file LevenshteinMethod.java.

Here is the call graph for this function:

double cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.getMinimumPercentage ( )

Minimum percentage getter

Returns
minimum similarity percentage

Definition at line 51 of file LevenshteinMethod.java.

static int cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.Minimum ( int  a,
int  b,
int  c 
)
staticprivate

Function for choosing minimum of three values

Parameters
afirst value
bsecond value
cthird value
Returns
the minimum value

Definition at line 92 of file LevenshteinMethod.java.

Here is the caller graph for this function:

void cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.setMinimumPercentage ( double  minimumPercentage)

Minimum percentage setter

Parameters
minimumPercentageminimum similarity percentage

Definition at line 42 of file LevenshteinMethod.java.

static double cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.similarity ( String  s,
String  t 
)
staticprivate

Levenshtein's similarity algorithm

Parameters
sfirst string to compare
tsecond string to compare
Returns
similarity in interval <0..1> (0-100%)

Definition at line 115 of file LevenshteinMethod.java.

Here is the call graph for this function:

Here is the caller graph for this function:

String cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.toString ( )

Overriden toString() method

Returns
string representation of class

Definition at line 80 of file LevenshteinMethod.java.

Member Data Documentation

double cz.vutbr.fit.knot.annotations.fragmentUpdater.compareMethods.LevenshteinMethod.minimumPercentage
private

Definition at line 25 of file LevenshteinMethod.java.


The documentation for this class was generated from the following file: