ANN - SimHash, a library to find the percentage of similarity between two given strings.

741 views
Skip to first unread message

AllenDang

unread,
Jul 29, 2013, 10:41:07 PM7/29/13
to golan...@googlegroups.com
Hi, Guys

I just ported the C# version SimHash (http://simhash.codeplex.com/) to go, it's a library to find the percentage of similarity between two given strings, share it with you guys. 

I'm developing a website needs similar feature like stackoverflow, related topic of questions could instantly popup during entering a new one. And after a little research, I found that simhash is a good algorithm, so I just port a stable implementation from C# to Go. Hope it is useful.


The usage is very simple, there is only one method actually, demo code is listed below.

needle := "Reading bytes into structs using reflection"
hayStack := "Golang - mapping an variable length array to a struct"

likeness := GetLikenessValue(needle, hayStack)
fmt.Println("Likeness:", likeness)

Best Regards

Damian Gryski

unread,
Jul 30, 2013, 4:40:36 AM7/30/13
to golan...@googlegroups.com

AllenDang

unread,
Jul 30, 2013, 9:36:45 PM7/30/13
to golan...@googlegroups.com
Yes, I know them, but they are not very promising.
Reply all
Reply to author
Forward
0 new messages