-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ShingleBased.GetProfile is not public #21
Comments
Thanks for reporting this. That is likely a peculiarity of the port from Java (the examples were also ported). We'll take a look. Thanks! |
I guess that you havent had the time for this yet? |
…tation and add unit test for Cosine similarity. #21
My apologies for this (and the other PRs here) for slipping through the cracks in the crazy year that was 2020. But there's no need to be sarcastic or rude here. Asking for a status update is fine, trolling is not. I'm preparing an updated release with this fix. Basically the new pattern will be: using System;
using F23.StringSimilarity;
public class Program
{
public static void Main(string[] args)
{
string s1 = "My first string";
string s2 = "My other string...";
// Let's work with sequences of 2 characters...
var cosine = new Cosine(2);
// For cosine similarity I need the profile of strings
var profile1 = cosine.GetProfile(s1);
var profile2 = cosine.GetProfile(s2);
// Prints 0.516185
Console.WriteLine(cosine.Similarity(profile1, profile2));
}
} The removal of |
Hi @kentcb - I just published 4.0.0-beta to NuGet with this change included. Once it's available, can you pull and see if this resolves your issue? Note that this version also updates to .NET Standard 2.0, which drops support for the out-of-support .NET Core 1.x. |
@paulirwin thanks very much for fixing this. As it happens, I've moved on from the job where I was using this. Happy for you to close this if you're happy 🙂 |
v4.0.0 released with this change |
Hi,
Just trying this library out and the README gives this example:
However, this doesn't compile because
ShingleBased.GetProfile
is protected and becauseStringProfile
no longer appears to be a thing (or maybe that's only in the Java code...?).Anyway, I can subclass
Cosine
to hackily gain access toGetProfile
, but then I can't really do anything meaningful with it because there is noStringProfile.CosineSimilarity
available. I ended up having to copy/pasteCosine
in its entirety and hacking in aGetProfile
andCosineSimilarity
method to gain access to this functionality:The text was updated successfully, but these errors were encountered: