feat(scanner): add native artifact pipeline
Add native IK-style capture processing, Artifact Inventory, explicit promotion and single-result review. Confirm the three live OCR corrections in the eval corpus and preserve extraction/value separation.
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace GenshinAssistant.InputHelper;
|
||||
|
||||
internal static class NativeScannerFiles
|
||||
{
|
||||
private static readonly JsonSerializerOptions PrettyJson = new(JsonSerializerDefaults.Web)
|
||||
{
|
||||
WriteIndented = true,
|
||||
};
|
||||
|
||||
private static readonly JsonSerializerOptions LineJson = new(JsonSerializerDefaults.Web);
|
||||
|
||||
public static void WriteJson(string path, object payload)
|
||||
{
|
||||
File.WriteAllText(path, JsonSerializer.Serialize(payload, PrettyJson));
|
||||
}
|
||||
|
||||
public static void AppendJsonLine(StreamWriter writer, object payload)
|
||||
{
|
||||
writer.WriteLine(JsonSerializer.Serialize(payload, LineJson));
|
||||
writer.Flush();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user