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.
29 lines
856 B
C#
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);
|
|
}
|
|
}
|