Start networking and exchanging professional insights

Register now or log in to join your professional community.

Follow

How can I compare two text to approximate match in TCL scripting language?

set text1 "compare text1 " set text2 "compare text2" Then text1 have one difference with text2 so the match is99% Is there anyway in tcl to do that

user-image
Question added by Khadijah Shtayat , Technical Lead , Opensooq
Date Posted: 2013/09/18

:) http://rosettacode.org/wiki/Levenshtein_distance#Tcl

better to use

using array to get the value and calculate a string length..\ use the string length in for loop and compare the asic value of the characters

 

krishna majhi
by krishna majhi , Oracle Consultant / Developer , schlumberger (Contract by MPH/GNRS)

find the minimum length string. Let it be text1 and length in N

now for C=N to1 find the sub string from both strings  starting with position1 to C

When the string matches calculate the % by calculating (C/N)*100.

The answer is generic hope you can find TCL code for it.

More Questions Like This

Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.