Table of Contents

Method GetTrainingData

Namespace
LMKit.TextAnalysis
Assembly
LM-Kit.NET.dll

GetTrainingData(TrainingDataset, int, bool, int?)

Retrieves training data for fine-tuning a sarcasm detection model from a specified dataset.

public static List<(string, bool)> GetTrainingData(SarcasmDetection.TrainingDataset dataset, int maxSamples = 2147483647, bool shuffle = false, int? seed = null)

Parameters

dataset SarcasmDetection.TrainingDataset

The dataset to retrieve training data from.

maxSamples int

The maximum number of samples to retrieve from the dataset. Default is 1000.

shuffle bool

Indicates whether to shuffle the dataset before selecting samples. Default is false.

seed int?

An optional seed for the random number generator used when shuffling. If null, the shuffle operation will not be seeded.

Returns

List<(string, bool)>

A list of tuples where each tuple contains a string (the text) and a boolean (the sarcastic tone label).

Exceptions

ArgumentException

Thrown if the dataset is not recognized.