Difference between revisions of "Taxamatch Algorithm"
From D4Science Wiki
Line 15: | Line 15: | ||
## If there is an exact match, print that species. | ## If there is an exact match, print that species. | ||
# Get the root of the normalized input and search it in the database. | # Get the root of the normalized input and search it in the database. | ||
+ | ## If there is an exact match, print that species. | ||
# Run last search without any filter of genus and species | # Run last search without any filter of genus and species | ||
# Filter the output using the functions: phonetic, mdld, and similarity. | # Filter the output using the functions: phonetic, mdld, and similarity. |
Revision as of 06:17, 14 November 2012
Defining of Terms
Taxamatch is
Algorithm
Here is the step by step procedures and cases used in running Taxamatch:
- 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;
- Normalize the user's input:
- Transform any accented character to its non accented character.
- Strips out any html character and drop any character other than A-Z, a-z and space.
- Remove multiple double letters or multiple spaces.
- Get the normalized input and search it in the database.
- If there is an exact match, print that species.
- Get the root of the normalized input and search it in the database.
- If there is an exact match, print that species.
- 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:
- the input is phonetic match with the data of greater than or equal to 0.4
- the mdld of input and data is less than or equal to 4
- the similarity of input and data is:
- equals to 100%. This is an exact match.
- between 50% and 100%. This is a near match.