This commit is contained in:
20
docs/snippets/csharp/config/language_detection_config.md
Normal file
20
docs/snippets/csharp/config/language_detection_config.md
Normal file
@@ -0,0 +1,20 @@
|
||||
```csharp title="C#"
|
||||
using Kreuzberg;
|
||||
|
||||
var config = new ExtractionConfig
|
||||
{
|
||||
LanguageDetection = new LanguageDetectionConfig
|
||||
{
|
||||
Enabled = true,
|
||||
MinConfidence = 0.8,
|
||||
DetectMultiple = true
|
||||
}
|
||||
};
|
||||
|
||||
var result = await KreuzbergLib.ExtractFile("document.pdf", null, config);
|
||||
Console.WriteLine($"Detected language: {result.Language}");
|
||||
if (result.DetectedLanguages != null)
|
||||
{
|
||||
Console.WriteLine($"All detected: {string.Join(", ", result.DetectedLanguages)}");
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user