﻿//sample usage c# code

var binaryClassificationDataPath = Path.Combine(Environment.CurrentDirectory, "SampleData", "comments.txt");

var binaryClassification = new BinaryClassification();

var splitDataView = binaryClassification.LoadData(binaryClassificationDataPath);
var model = binaryClassification.BuildAndTrainModel(splitDataView.TrainSet);
binaryClassification.Evaluate(model, splitDataView.TestSet);

var results = binaryClassification.UseModelWithBatchItems(model, new[]
{
    "It was a great vacation!",
    "Doesn't work",
    "Its really bad many Bugs.",
    "Very nice decor"

});
foreach (var result in results)
{
    Console.WriteLine($"Prediction: {(result.Item2 ? "Positive" : "Negative")} \t| Sentiment: {result.Item1}");
}

/* RESULT
Prediction: Positive    | Sentiment: It was a great vacation!
Prediction: Negative    | Sentiment: Doesn't work
Prediction: Negative    | Sentiment: Its really bad many Bugs.
Prediction: Positive    | Sentiment: Very nice decor
*/
