Android Programming Press on the image to return to the main documentation page.

ABSimMetrics

Written by Alain Bailleul

List of types:

ABFoundMatch
ABSimMetrics

ABFoundMatch


Events:

None

Members:


  FoundString As String [read only]

  Percentage As Float [read only]

  UsedAlgorithm As Int [read only]

  UsedAlgorithmName As String [read only]

Members description:

FoundString As String [read only]
Percentage As Float [read only]
UsedAlgorithm As Int [read only]
UsedAlgorithmName As String [read only]

ABSimMetrics

A library to do 'fuzzy' matches. It looks for the similarity between two strings
or searches for the best match of a string in a list of strings.

More information on the algorithms can be found at Algorithms

Implemented algorithms:

CHAPMAN_MATCHING_SOUNDEX
CHAPMAN_MEAN_LENGTH
CHAPMAN_ORDERED_NAME_COMPOUND_SIMILARITY
JARO
JARO_WINKLER
LEVENSHTEIN_DISTANCE
MONGE_ELKAN
NEEDLEMAN_WUNCH
QGRAMS_DISTANCE
SMITH_WATERMAN
SMITH_WATERMAN_GOTOH
SMITH_WATERMAN_GOTOH_WINDOWED_AFFINE
SOUNDEX
TAGLINK
TAGLINK_TOKEN

Events:

None

Members:


  ABFindBestMatch (myList() As String, SearchTerm As String, algorithm As Int) As ABFoundMatch

  ABFindBestMatchAll (myList() As String, SearchTerm As String) As ABFoundMatch

  ABGetSimilarity (string1 As String, string2 As String, algorithm As Int) As Float

  CHAPMAN_MATCHING_SOUNDEX As Int [read only]

  CHAPMAN_MEAN_LENGTH As Int [read only]

  CHAPMAN_ORDERED_NAME_COMPOUND_SIMILARITY As Int [read only]

  JARO As Int [read only]

  JARO_WINKLER As Int [read only]

  LEVENSHTEIN_DISTANCE As Int [read only]

  MONGE_ELKAN As Int [read only]

  NEEDLEMAN_WUNCH As Int [read only]

  QGRAMS_DISTANCE As Int [read only]

  SMITH_WATERMAN As Int [read only]

  SMITH_WATERMAN_GOTOH As Int [read only]

  SMITH_WATERMAN_GOTOH_WINDOWED_AFFINE As Int [read only]

  SOUNDEX As Int [read only]

  TAGLINK As Int [read only]

  TAGLINK_TOKEN As Int [read only]

Members description:

ABFindBestMatch (myList() As String, SearchTerm As String, algorithm As Int) As ABFoundMatch
Finds the best match of a string in a list of strings using a specific algorithm.

Returns an ABFoundMatch object

Example:
Dim mat as ABFoundMatch
Dim mylist(3) as String

mylist(0) = "Alain"
mylist(1) = "Aldo"
mylist(2) = "Albrecht"

mat = ABFindBestMatch(myList, "Albert", sim.LEVENSHTEIN_DISTANCE)

msgbox (mat.FoundString, "")
ABFindBestMatchAll (myList() As String, SearchTerm As String) As ABFoundMatch
Finds the best match of a string in a list of strings using all available
algorithms.

Returns an ABFoundMatch object

Example:
Dim mat as ABFoundMatch
Dim mylist(3) as String

mylist(0) = "Alain"
mylist(1) = "Aldo"
mylist(2) = "Albrecht"

mat = ABFindBestMatchAll(myList, "Albert")

msgbox (mat.FoundString, "")
ABGetSimilarity (string1 As String, string2 As String, algorithm As Int) As Float
gives the percentage a string matches with another string using a specific algorithm.

Returns an float (percentage)

Example:

dim perc as float
perc = ABGetSimilarity("Albrecht", "Albert", sim.LEVENSHTEIN_DISTANCE)

msgbox (perc, "")
CHAPMAN_MATCHING_SOUNDEX As Int [read only]
CHAPMAN_MEAN_LENGTH As Int [read only]
CHAPMAN_ORDERED_NAME_COMPOUND_SIMILARITY As Int [read only]
JARO As Int [read only]
JARO_WINKLER As Int [read only]
LEVENSHTEIN_DISTANCE As Int [read only]
MONGE_ELKAN As Int [read only]
NEEDLEMAN_WUNCH As Int [read only]
QGRAMS_DISTANCE As Int [read only]
SMITH_WATERMAN As Int [read only]
SMITH_WATERMAN_GOTOH As Int [read only]
SMITH_WATERMAN_GOTOH_WINDOWED_AFFINE As Int [read only]
SOUNDEX As Int [read only]
TAGLINK As Int [read only]
TAGLINK_TOKEN As Int [read only]

Top