This commit is contained in:
23
docs/snippets/go/config/language_detection_config.md
Normal file
23
docs/snippets/go/config/language_detection_config.md
Normal file
@@ -0,0 +1,23 @@
|
||||
```go title="Go"
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/kreuzberg-dev/kreuzberg/packages/go/v5"
|
||||
)
|
||||
|
||||
func main() {
|
||||
minConfidence := 0.8
|
||||
config := &kreuzberg.ExtractionConfig{
|
||||
LanguageDetection: &kreuzberg.LanguageDetectionConfig{
|
||||
Enabled: true,
|
||||
MinConfidence: &minConfidence,
|
||||
DetectMultiple: false,
|
||||
},
|
||||
}
|
||||
|
||||
fmt.Printf("Language detection enabled: %v\n", config.LanguageDetection.Enabled)
|
||||
fmt.Printf("Min confidence: %f\n", *config.LanguageDetection.MinConfidence)
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user