feat: implement AI-driven knowledge extraction service with semantic caching and persistent storage
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Text.RegularExpressions;
|
||||
|
||||
public class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
string input1 = "Hello \n World";
|
||||
string input2 = "Hello World";
|
||||
|
||||
string norm1 = Normalize(input1);
|
||||
string norm2 = Normalize(input2);
|
||||
|
||||
Console.WriteLine($"Input 1: '{input1}' -> Normalized: '{norm1}'");
|
||||
Console.WriteLine($"Input 2: '{input2}' -> Normalized: '{norm2}'");
|
||||
Console.WriteLine($"Match: {norm1 == norm2}");
|
||||
}
|
||||
|
||||
public static string Normalize(string input)
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(input)) return string.Empty;
|
||||
var normalized = Regex.Replace(input.Trim(), @"\s+", " ");
|
||||
return normalized.ToLowerInvariant();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user