Difference between revisions of "Taxamatch Algorithm"

From D4Science Wiki
Jump to: navigation, search
(Taxamatch Algorithm)
(Algorithm)
Line 4: Line 4:
 
== Algorithm ==
 
== Algorithm ==
 
Here is the step by step procedures and cases used in running '''Taxamatch''':
 
Here is the step by step procedures and cases used in running '''Taxamatch''':
1. Get the user input of species.  
+
 
 +
# Get the user's input of species. (e.g. Genus, Species or Genus+Species)
 +
# Search for the exact match in the database.;
 +
* If there is an exact match, print that species;
 +
* Else, normalize the user's input:
 +
  i. Transform any accented character to its non accented character.
 +
  ii. Strips out any html character and drop any character other than A-Z, a-z and space.
 +
  iii. Remove multiple double letters or multiple spaces.
 +
* Get the normalized input and search it in the database.
 +
  i. If there is an exact match, print that species.
 +
  ii. Else, get the root of the normalized input and search it in the database.
 +
 
 +
 +
 
 +
If there is no match,
 +
 
 +
# Run last search without any filter of genus and species
 +
# Filter the output using the functions: phonetic, mdld, and similarity.
 +
 
 +
;Phonetic
 +
:compare pronunciation similarity of input and data. 1 being the highest
 +
;MDLD
 +
:the Modified Damerau-Levenshtein Distance test
 +
:the minimal number of characters you have to replace, insert, or delete to make two strings similar. If MDLD is equals to 0, it means the two strings are the same
 +
;SImilarity
 +
:returns percentage similarity of input and data
 +
   
 +
It prints the species if it satisfy all the conditions below:
 +
 
 +
a. the input is phonetic match with the data of greater than or equal to 0.4
 +
 
 +
b. the mdld of input and data is less than or equal to 4
 +
 
 +
c. the similarity of input and data is:
 +
 
 +
i. equals to 100%. This is an exact match.
 +
 
 +
ii. between 50% and 100%. This is a near match.
 +
 
 +
 
  
 
''' This page is under construction. '''
 
''' This page is under construction. '''

Revision as of 04:42, 14 November 2012

Defining of Terms

Taxamatch is

Algorithm

Here is the step by step procedures and cases used in running Taxamatch:

  1. Get the user's input of species. (e.g. Genus, Species or Genus+Species)
  2. Search for the exact match in the database.;
  • If there is an exact match, print that species;
  • Else, normalize the user's input:
  i. Transform any accented character to its non accented character.
  ii. Strips out any html character and drop any character other than A-Z, a-z and space.
  iii. Remove multiple double letters or multiple spaces.
  • Get the normalized input and search it in the database.
  i. If there is an exact match, print that species.
  ii. Else, get the root of the normalized input and search it in the database.


If there is no match,

  1. Run last search without any filter of genus and species
  2. Filter the output using the functions: phonetic, mdld, and similarity.
Phonetic
compare pronunciation similarity of input and data. 1 being the highest
MDLD
the Modified Damerau-Levenshtein Distance test
the minimal number of characters you have to replace, insert, or delete to make two strings similar. If MDLD is equals to 0, it means the two strings are the same
SImilarity
returns percentage similarity of input and data

It prints the species if it satisfy all the conditions below:

a. the input is phonetic match with the data of greater than or equal to 0.4

b. the mdld of input and data is less than or equal to 4

c. the similarity of input and data is:

i. equals to 100%. This is an exact match.

ii. between 50% and 100%. This is a near match.


This page is under construction.