Hi all,
I am trying to do the exact scenario as this StackOverflow questions
Compare Strings Javascript Return %of Likely
Can someone point me out how to get started with Uipath for this scenario?
For example
Str1 = “UiPath Bot Process”
Str2 = “UPath bo Proce”
80% Match
Then assign Status=“Normal”
Else “Exception”
@ClaytonM , @lakshman , @Palaniyappan
just tagging to get help. Obviously I would like to get help from anyone
Thank You
Yoichi
(Yoichi)
March 3, 2020, 4:38am
2
Hi,
You need to calculate edit distance to achieve it and there is a component for it at UiPath Connect!
Can you try it?
Regards,
2 Likes
GBK
(GBK)
March 3, 2020, 4:49am
3
@whitestar - i did similar one with a invoke code option with our own code.
1 - Split string to character
2- compares character by character
3 - skip character till the next match
4- do a loop till the last word
5- and calculate the % by hits/count
2 Likes
Thank for it but i want to know how to do rather than using the ready made one.
i tested and it’s not exactly working
For example
String1 = “UiPah,Is,This”
String2 = “This is UiPath”
and i got return with 25% only.
For me it’s 90% match value just not in an order and , added instead of space.
Any other algorithm i can test it out ?
Thanks everyone.
kvbramha
(Kvbramha)
August 19, 2021, 8:20am
6
Did you find any solution for this?
I am also searching for the same thing.
Hi @kvbramha ,
I ended up using the FuzzyWuzzy python library to do it.
It has been working very well for us
Let me know if you have questions happy to help.
kvbramha
(Kvbramha)
August 19, 2021, 9:39am
8
Did you get solution for this
Yes, you will need to use invoke code to run the python script.
kvbramha
(Kvbramha)
August 19, 2021, 2:47pm
10
Can you please provide the python code?
@kvbramha
this is the code
from difflib import SequenceMatcher
def simmilarity(a,b):
return SequenceMatcher(None,a,b).ratio()
a, b are the string u need to compare, it will return the similarity percentage
Regards,
Nived N
3 Likes
rmorgan
(Rmorgan)
February 26, 2024, 11:08am
12
how would you go about implementing this