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:
@@ -7,16 +7,23 @@ public static class RealNerModelPaths
|
||||
|
||||
public static string ResolveRepoModelPath()
|
||||
{
|
||||
var directory = new DirectoryInfo(AppContext.BaseDirectory);
|
||||
while (directory is not null)
|
||||
foreach (var relativePath in new[]
|
||||
{
|
||||
Path.Combine("models", "en", "ner-model.onnx"),
|
||||
Path.Combine("models", "ner-model.onnx")
|
||||
})
|
||||
{
|
||||
var candidate = Path.Combine(directory.FullName, "models", "ner-model.onnx");
|
||||
if (File.Exists(candidate))
|
||||
var directory = new DirectoryInfo(AppContext.BaseDirectory);
|
||||
while (directory is not null)
|
||||
{
|
||||
return candidate;
|
||||
}
|
||||
var candidate = Path.Combine(directory.FullName, relativePath);
|
||||
if (File.Exists(candidate))
|
||||
{
|
||||
return candidate;
|
||||
}
|
||||
|
||||
directory = directory.Parent;
|
||||
directory = directory.Parent;
|
||||
}
|
||||
}
|
||||
|
||||
return Path.Combine(Environment.CurrentDirectory, "models", "ner-model.onnx");
|
||||
|
||||
Reference in New Issue
Block a user