Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
This repository was archived by the owner on Dec 21, 2024. It is now read-only.

Simple US-English String Similarity Score Calculator

License

NotificationsYou must be signed in to change notification settings

jchristn/StringSimilarity

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This class library calculates a score from 0 to 1 based on the similarity of two supplied strings.

Effective v1.0.1, StringSimilarity is now targeted to both .NET Core 2.0 and .NET Framework 4.5.2.

Help or Feedback

First things first - do you need help or have feedback? Contact me at joel dot christner at gmail dot com or file an issue here!

New in v1.0.1

  • Retarget to .NET Core 2.0 and .NET Framework 4.5.2

Score Computation

  • If one string is null/empty and the other is not, the score is 0
  • If both strings are null/empty, the score is 1
  • Otherwise, a length score is multiplied by a character match score, where length score = (min / max) and character match score is (num matching / total)

Example

Refer to the Test project for an example.

usingSimilarity;Console.Write("String 1 : ");stringstr1=Console.ReadLine();Console.Write("String 2 : ");stringstr2=Console.ReadLine();Console.WriteLine("Score    : "+StringSimilarity.Calculate(str1,str2));

Version History

Notes from previous versions (starting with v1.0.0) will be moved here.v1.0.0

  • First release

About

Simple US-English String Similarity Score Calculator

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages


[8]ページ先頭

©2009-2025 Movatter.jp