Constructor PiiExtractionTrainingDataset
- Namespace
- LMKit.TextAnalysis.Training
- Assembly
- LM-Kit.NET.dll
PiiExtractionTrainingDataset(PiiExtraction)
Initializes a PII/Entity-extraction-focused training dataset bound to a specific PiiExtraction configuration.
public PiiExtractionTrainingDataset(PiiExtraction engine)
Parameters
engine
PiiExtractionThe configured PII extraction engine whose prompts, model, supported entity types, and preferred modality are used to generate training samples.
Examples
var pii = new PiiExtraction(/* configured elsewhere */);
var dataset = new PiiExtractionTrainingDataset(pii)
{
EnableModalityAugmentation = true
};
var annotations = new[]
{
new EntityAnnotation("Person", "Alice Martin"),
new EntityAnnotation("PhoneNumber", "+33 6 12 34 56 78")
};
dataset.AddSample(
"Contact: Alice Martin, phone +33 6 12 34 56 78.",
annotations);
Remarks
The constructor captures the current state of engine
(e.g., titles/descriptions, prompt templates, and modality preferences). Subsequent calls
to AddSample(Attachment, IEnumerable<EntityAnnotation>)
and overloads synthesize chat histories consistent with this configuration.