DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: NANY 2019 - StringSimilarity - Release  (Read 20,821 times)

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
NANY 2019 - StringSimilarity - Release
« on: November 11, 2018, 11:19 AM »
NANY 2019 Entry Information

Application Name StringSimilarity
Version 1.3.0.0
Short Description Compare 2 strings/texts giving a distance/proximity score using several algorithms
Supported OSes Windows 7 or newer (.NET 4.5 or newer required)
Web Page StringSimilarity page
Download Location StringSimilarity page
System Requirements
  • Windows 7/8/10
  • .NET 4.5 or newer
Version History
  • 2018-11-24 1.3.0.0: Added Load from (txt) file feature.
  • 2018-11-11 1.2.0.0: NANY Release. Show all algorithm results in a grid
  • 2018-10-26 1.1.0.0: (not released) Added extra algorithms, restore screen size/position and settings.
  • 2018-10-24 1.0.0.0: Initial release
Author Link to Ath's Profile page


Description
As a response to a request by HelmutWe I searched and found an algorithm that seemed to match the request, and folded that into a C#/WinForms application.
After adding a few similar but different algorithms, also found on the internet, and re-shaping the UI a bit to handle larger texts and a results grid, the current incarnation is now available.

Used algorithms and sources:
AlgorithmSource
Jaro-WinklerRonnie Overby's Jaro-Winkler
Damerau-LevenshteinWicked Shimmy's Damerau Levenshtein
F23 Sorensen-dice coefficientFeature 23's StringSimilarity.NET library
F23 Cosine similarity(see above)
F23 Jaccard index(see above)
F23 Normalized Levenshtein(see above)

Features
Compare 2 strings/texts and calculate their similarity.

Planned Features
Allow to select 2 files and determine their similarity

Requested features
Make available as separate dll for use from other tools (undecided yet)

Screenshots
Initial screen:
StringSimilarity-1.2.0-initial.png

Comparing Similarity and Simelarity
StringSimilarity-1.2.0-similarity.png

Usage
Installation
- Unzip the file to it's own directory
- Run the exe
(A settings.xml file will be created when closing the application)

Using the Application
- Enter some texts to compare
- Select desired options
- Results are updated immediately when both strings are non-empty
- Results can be sorted by clicking a column title

Uninstallation
- Close the application
- Remove all files

Known Issues
To be reported by users, none so far...
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)
« Last Edit: November 24, 2018, 02:05 PM by Ath »

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: NANY 2019 - StringSimilarity - Release
« Reply #1 on: November 11, 2018, 11:20 AM »
(Reserved for future use)
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)
« Last Edit: November 11, 2018, 11:27 AM by Ath »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: NANY 2019 - StringSimilarity - Release
« Reply #2 on: November 11, 2018, 11:35 AM »
very nice  :up:

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • Participated in NANY Challenge Four Times
    • Coding Snacks
Re: NANY 2019 - StringSimilarity - Release
« Reply #3 on: November 11, 2018, 11:59 AM »
I love such stuff, cool project!
Thankyou for wrapping it up so far!

Is a export things to dll planned? ...for programmers reachable by Api with functions you let us use...

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: NANY 2019 - StringSimilarity - Release
« Reply #4 on: November 24, 2018, 02:15 PM »
StringSimilarity has been updated to 1.3.0, adding the ability to load text from txt files (*.txt or *.*), no file-content check!

Also, the download has been moved to my DCMembers space, link available from the first post, above.



Is a export things to dll planned?
Haven't decided on this request yet, as it's quite a bit of work for such a small feature-set :huh:
What would you want to use it for? Or would a command-line enabled version (with somewhat formatted output) suffice?
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

HelmutWe

  • Supporting Member
  • Joined in 2018
  • **
  • Posts: 62
Re: NANY 2019 - StringSimilarity - Release
« Reply #5 on: January 07, 2019, 07:55 AM »
Great work. Have you considered a commercial use? Could be used to identify typos in databases. That is variations of data compared to an official list like names of locations, chemical formulae, parts of engines etc.
And the best that you can hope for is to die in your sleep (Schlitz/Rogers)

Uit_VerKoop3

  • Supporting Member
  • Joined in 2013
  • **
  • Posts: 1
Re: NANY 2019 - StringSimilarity - Release
« Reply #6 on: January 07, 2019, 09:22 AM »
Hi, nice stuff.
Is it possible to build in a comparison based on trigrams?
Start at pos 1 of the string take 3 characters and hold them, shift 1 position and do the same, until the end.
Do the same for the second string.
See how many trig's are the same among the strings and calculate the percentage to the total number of trig's of string 1.
In this way you get a good idea about the similarity between the different writings of street names, etc.
Keep up the good work

Ath

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 3,649
    • Participated in NANY Challenge Eleven Times
    • Coding Snacks
    • Linux User
    • Hardware Hacker
Re: NANY 2019 - StringSimilarity - Release
« Reply #7 on: January 07, 2019, 08:33 PM »
Start at pos 1 of the string take 3 characters and hold them, shift 1 position and do the same, until the end.
Do the same for the second string.
See how many trig's are the same among the strings and calculate the percentage to the total number of trig's of string 1.
I'm not quite sure, nor an expert on the subject, but isn't this the 'F23 Jaccard index' calculation from StringSimilarity? You'd have to multiply by 100 to get a percentage, if you need that, I kept all results except Damerau-Levenshtein (number of edits) in the 0..1 range. The documentation for the F23 library and an excerpt of its algorithms can be found here
/Ton
Ath's software collection, Quote: "A problem well stated is a problem half-solved." (Charles Kettering)

HelmutWe

  • Supporting Member
  • Joined in 2018
  • **
  • Posts: 62
Re: NANY 2019 - StringSimilarity - Release
« Reply #8 on: January 08, 2019, 08:12 AM »
Hi Uit_Verkoop3. What you have in mind is very similar to my thoughts which I wasn´t able to explain further. Only I wasn´t thinking about trigrams but "n-grams" to to speak. My proposal was splitting a string in all possible substrings. Like "Microsoft" would consist of:
M, i, c, r, o, s, o, f, t, plus Mi, ic, cr, ro, so, of, ft plus Mic, icr, cro, ros, oso, sof, oft plus Micr, icro, cros... and so on. But thinking of this kind of pattern recognition I got carried away. Ending on thoughts of pattern recognision about Chinese. And I´m still thinking. "10001" is similar to "7asdz7" in a way, isn´t it? Or "HAL" is similar to "IBM"? (Space Odyssey)
And the best that you can hope for is to die in your sleep (Schlitz/Rogers)

Original address: https://www.donationcoder.com/forum/index.php?topic=46653.0