Files
llm-pii-poc/tests/PiiRedaction.Infrastructure.Tests/Onnx/NerLabelConfigTests.cs
Bilal Nazer Ali cf8f5a7232 Add Tamil NER routing and WPF test harness for POC validation.
Introduce dual-script ONNX NER routing (English/Tamil/mixed), Tamil console samples and integration tests, model download scripts, and a resizable WPF MVVM harness with click-to-load prompts, batch validation, and runtime-adjustable detection panels.
2026-07-07 17:12:38 +05:30

29 lines
856 B
C#

using FluentAssertions;
using PiiRedaction.Core.Detection;
using PiiRedaction.Core.Models;
using PiiRedaction.Infrastructure.Onnx;
namespace PiiRedaction.Infrastructure.Tests.Onnx;
[TestFixture]
public sealed class NerLabelConfigTests
{
[TestCase("B-PER", true)]
[TestCase("I-PER", true)]
[TestCase("B-PERSON", true)]
[TestCase("B-ORG", false)]
public void English_IsPersonLabel_MatchesExpected(string label, bool expected)
{
NerLabelConfig.English.IsPersonLabel(label).Should().Be(expected);
}
[TestCase("B-person-politician", true)]
[TestCase("I-person-artist", true)]
[TestCase("B-location", false)]
[TestCase("O", false)]
public void Tamil_IsPersonLabel_MatchesFineGrainedTags(string label, bool expected)
{
NerLabelConfig.Tamil.IsPersonLabel(label).Should().Be(expected);
}
}