SquadDataLoader<T>

Models & Types · AiDotNet.Data.Text.Benchmarks

Loads the SQuAD question answering dataset (100K+ Q&A pairs on Wikipedia articles).

Inheritance: DataLoaderBase<T> → InputOutputDataLoaderBase<T, Tensor<T>, Tensor<T>> → SquadDataLoader<T>

How It Works

SQuAD expects JSON files:

Features are concatenated context + question tokens Tensor[N, MaxContextLength + MaxQuestionLength]. Labels are answer start/end positions Tensor[N, 2].

Constructors

Constructor Summary
SquadDataLoader(SquadDataLoaderOptions options) Creates a new SQuAD data loader.

Properties

Property Summary
int FeatureCount { get; }
int OutputDimension { get; }
int TotalCount { get; }
string Description { get; }
string Name { get; }

Methods

Method Summary
ValueTuple<IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>, IInputOutputDataLoader<T, Tensor<T>, Tensor<T>>> Split(double trainRatio, double validationRatio, int? seed)