This commit is contained in:
23
docs/snippets/go/config/token_reduction_config.md
Normal file
23
docs/snippets/go/config/token_reduction_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() {
|
||||
preserveImportant := true
|
||||
config := kreuzberg.ExtractionConfig{
|
||||
TokenReduction: &kreuzberg.TokenReductionOptions{
|
||||
Mode: "moderate",
|
||||
PreserveImportantWords: &preserveImportant,
|
||||
},
|
||||
}
|
||||
|
||||
fmt.Printf("Mode: %s, Preserve Important Words: %v\n",
|
||||
config.TokenReduction.Mode,
|
||||
*config.TokenReduction.PreserveImportantWords)
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user