LEVENSHTEIN With Modifier (ANCHOR) - trillium_discovery - trillium_quality - 17.2

Trillium Control Center

Product type
Software
Portfolio
Verify
Product family
Trillium
Product
Trillium > Trillium Quality
Trillium > Trillium Discovery
Version
17.2
Language
English
Product name
Trillium Quality and Discovery
Title
Trillium Control Center
First publish date
2008
Last updated
2024-07-01
Published on
2024-07-01T08:56:48.630530

The ANCHOR modifier is used with the LEVENSHTEIN routine. This modifier finds a match of one string (String 1) within another string (String 2) by making a SUBSTRNG-like comparison from the beginning or the end of String 2.

Note: The ANCHOR modifier performs the comparison in one direction only; it looks for String 1 in String 2 and not vice versa. If you need to look for String 2 in String 1, use the RECIPROCAL modifier in conjunction with ANCHOR.

Syntax

ANCHOR (m,n

where

  • m = 1 or 0 . This indicates that the search begins at the beginning of the string. 1 is on, 0 is off. Default is 1.
  • n = 1 or 0. This indicates that the search begins at the end of the string. 1 is on, 0 is off. Default is 1.

Acceptable Values

ANCHOR(0,0) - Off for the beginning and the end of the string.

ANCHOR(1,0) - On for the beginning of the string.

ANCHOR(0,1) - On for the end of the string.

ANCHOR(1,1) - On for the beginning and the end of the string. This is equivalent to the LEVENSHTEIN routine without using the ANCHOR modifier. Default.

Example 1

ANCHOR (1,0) 

String 1 - BELA

String 2 - ISABELA

The routine searches for the string "BELA" in "ISABELA" by anchoring the search at the beginning of the string and finds it after skipping over 3 characters. Therefore the edit distance is 3 and the score is 99-3=96.

Example 2

ANCHOR (0,1) 

String 1 - BELA

String 2 - ISABELA

The routine searches for the string "BELA" in "ISABELA" by anchoring the search at the end of the string and finds it at the end. Therefore the edit distance is 0 and the score is 99-0=99.