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.
This commit is contained in:
25
tests/TestSupport.Shared/RealTamilNerModelPaths.cs
Normal file
25
tests/TestSupport.Shared/RealTamilNerModelPaths.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
namespace PiiRedaction.Tests.Shared;
|
||||
|
||||
public static class RealTamilNerModelPaths
|
||||
{
|
||||
public const string ModelMissingMessage =
|
||||
"Tamil ONNX model not found. Run scripts/download-tamil-ner-model.ps1 from the repository root.";
|
||||
|
||||
public static string ResolveRepoModelPath()
|
||||
{
|
||||
const string relativePath = "models/ta/model.onnx";
|
||||
var directory = new DirectoryInfo(AppContext.BaseDirectory);
|
||||
while (directory is not null)
|
||||
{
|
||||
var candidate = Path.Combine(directory.FullName, relativePath);
|
||||
if (File.Exists(candidate))
|
||||
{
|
||||
return candidate;
|
||||
}
|
||||
|
||||
directory = directory.Parent;
|
||||
}
|
||||
|
||||
return Path.Combine(Environment.CurrentDirectory, relativePath);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user