curiosity-ai / catalyst

🚀 Catalyst is a C# Natural Language Processing library built for speed. Inspired by spaCy's design, it brings pre-trained models, out-of-the box support for training word and document embeddings, and flexible entity recognition models.
MIT License
699 stars 71 forks source link

Unit tests failing? #72

Open gillonba opened 2 years ago

gillonba commented 2 years ago

Is anyone else having trouble running the unit tests? Specifically in Catalyst.Tests? I am revisiting the project since writing some code about a year ago; for some reason some change appears to have broken my old code and I'm trying to figure out how to get things working again. So I re-downloaded the repo and am able to run the samples, but the unit tests keep failing and I don't know why. The tests fail at

var nlp = Pipeline.For(Language.English);

But why does

    static async Task Main(string[] args)
    {
        Console.OutputEncoding = Encoding.UTF8;
        ApplicationLogging.SetLoggerFactory(LoggerFactory.Create(lb => lb.AddConsole()));
        //Need to register the languages we want to use first
        Catalyst.Models.English.Register();
        //Configures the model storage to use the local folder ./catalyst-models/
        Storage.Current = new DiskStorage("catalyst-models");
        //Parse the documents using the English pipeline, as the text data is untokenized so far
        var nlp = Pipeline.For(Language.English);
        // etc...
    }

work, while

    [Theory]
    [InlineData("this is an abbreviation test As Soon As Possible (ASAP) I hope this abbreviation was found")]
    public void Abbreviations(string text)
    {
        Catalyst.Models.English.Register();
        Storage.Current = new DiskStorage("catalyst-models");
        var nlp = Pipeline.For(Language.English);  //await Pipeline.ForAsync(Language.English);
        // etc...
    }

throws an exception?

MessagePack.MessagePackSerializationException : Failed to deserialize Catalyst.Models.AveragePerceptronTaggerModel value.

---- MessagePack.MessagePackSerializationException : Unexpected msgpack code 118 (positive fixint) encountered.

I assume there is some kind of missing dependency?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.