Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Anyone have a canned subroutine that can determine how close a fit one
string is to another?

For example, if one string has one or more caps and the other doesn't

or one string has an "&" and the other has "and"

or one starts with "The" and the other doesn't

or one has a "2" and the other has "II"

etc.

Thanx in advance...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Those hardly constitute close fits, though, do they?

Sorry, I don't have anything like that.

Pete

On Oct 10, 10:52 pm, Elmer Smurdley wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?

For example, if one string has one or more caps and the other doesn't

or one string has an "&" and the other has "and"

or one starts with "The" and the other doesn't

or one has a "2" and the other has "II"

etc.

Thanx in advance...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Anyone have a canned subroutine that can determine how close a fit one
string is to another?


Hi. Not sure if this is what you want, but in Math, one option is the
"Levenshtein distance."

http://en.wikipedia.org/wiki/Levenshtein_distance

So, for example:

EditDistance["Kitten","sitting"]
3

EditDistance["Saturday","Sunday"]
3

EditDistance["Saturday","sunday",IgnoreCase-False]
4

--
Dana DeLouis


"Pete_UK" wrote in message
ups.com...
Those hardly constitute close fits, though, do they?

Sorry, I don't have anything like that.

Pete

On Oct 10, 10:52 pm, Elmer Smurdley wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?

For example, if one string has one or more caps and the other doesn't

or one string has an "&" and the other has "and"

or one starts with "The" and the other doesn't

or one has a "2" and the other has "II"

etc.

Thanx in advance...





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Routine with fuzzy logic to determine the relative comparison of two strings?

There's a vba link at (see #13) he
http://en.wikibooks.org/wiki/Algorit...r_Applications

Haven't tested it though.

--
HTH :)
Dana DeLouis
Windows XP & Excel 2007


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Don't know what happened to my earlier post, but this reponse was
right on the money.

Thanks, Dana

On Wed, 10 Oct 2007 19:25:33 -0400, "Dana DeLouis"
wrote:

There's a vba link at (see #13) he
http://en.wikibooks.org/wiki/Algorit...r_Applications

Haven't tested it though.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Thanks for that, Dana - I'd never heard of it before. I wonder how one
would cope with the example the OP gave of one string containing 2 and
the other containing ii (or <spaceii<space)?

Pete

On Oct 11, 12:07 am, "Dana DeLouis" wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?


Hi. Not sure if this is what you want, but in Math, one option is the
"Levenshtein distance."

http://en.wikipedia.org/wiki/Levenshtein_distance

So, for example:

EditDistance["Kitten","sitting"]
3

EditDistance["Saturday","Sunday"]
3

EditDistance["Saturday","sunday",IgnoreCase-False]
4

--
Dana DeLouis

"Pete_UK" wrote in message

ups.com...



Those hardly constitute close fits, though, do they?


Sorry, I don't have anything like that.


Pete


On Oct 10, 10:52 pm, Elmer Smurdley wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?


For example, if one string has one or more caps and the other doesn't


or one string has an "&" and the other has "and"


or one starts with "The" and the other doesn't


or one has a "2" and the other has "II"


etc.


Thanx in advance...- Hide quoted text -


- Show quoted text -



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 947
Default Routine with fuzzy logic to determine the relative comparison of two strings?

...one string containing 2 and the other containing ii.

Hi. Not sure on that one.
Anyway, such algorithms are used in different ways.
One example would be a function that links to a dictionary and uses that
"distance" algorithm as a default.

NearWords = Nearest[DictionaryLookup[__]];
Hence:

NearWords["Excel",10]

{"excel","Axel","Edsel","Ethel","excels","Exocet", "expel","Abel","ace","aced"}

--
Dana DeLouis


"Pete_UK" wrote in message
ups.com...
Thanks for that, Dana - I'd never heard of it before. I wonder how one
would cope with the example the OP gave of one string containing 2 and
the other containing ii (or <spaceii<space)?

Pete

On Oct 11, 12:07 am, "Dana DeLouis" wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?


Hi. Not sure if this is what you want, but in Math, one option is the
"Levenshtein distance."

http://en.wikipedia.org/wiki/Levenshtein_distance

So, for example:

EditDistance["Kitten","sitting"]
3

EditDistance["Saturday","Sunday"]
3

EditDistance["Saturday","sunday",IgnoreCase-False]
4

--
Dana DeLouis

"Pete_UK" wrote in message

ups.com...



Those hardly constitute close fits, though, do they?


Sorry, I don't have anything like that.


Pete


On Oct 10, 10:52 pm, Elmer Smurdley wrote:
Anyone have a canned subroutine that can determine how close a fit one
string is to another?


For example, if one string has one or more caps and the other doesn't


or one string has an "&" and the other has "and"


or one starts with "The" and the other doesn't


or one has a "2" and the other has "II"


etc.


Thanx in advance...- Hide quoted text -


- Show quoted text -





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default Routine with fuzzy logic to determine the relative comparison of two strings?

Thanx Dana.

Both of the algorithms mentioned are very close to what I need and a
very good starting point to resolving some of the other issues.


On Wed, 10 Oct 2007 20:32:40 -0400, "Dana DeLouis"
wrote:

...one string containing 2 and the other containing ii.


Hi. Not sure on that one.
Anyway, such algorithms are used in different ways.
One example would be a function that links to a dictionary and uses that
"distance" algorithm as a default.

NearWords = Nearest[DictionaryLookup[__]];
Hence:

NearWords["Excel",10]

{"excel","Axel","Edsel","Ethel","excels","Exocet" ,"expel","Abel","ace","aced"}

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
fuzzy match Marcy Excel Discussion (Misc queries) 5 February 1st 06 08:57 PM
How to find number of pairs of strings from list of strings? greg_overholt Excel Worksheet Functions 5 January 27th 06 10:42 PM
Outlines of Pie Charts - fuzzy Rachel Charts and Charting in Excel 0 January 6th 06 09:53 PM
Fuzzy matching data JaB Excel Discussion (Misc queries) 0 November 9th 05 04:21 PM
Using fuzzy logic in excel James Excel Discussion (Misc queries) 7 February 16th 05 07:08 PM


All times are GMT +1. The time now is 04:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"