Nomad changes
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s

This commit is contained in:
Henrik Jess Nielsen
2026-06-01 23:40:55 +02:00
parent 72b1a0a6ed
commit b4c07d3693
5723 changed files with 1130655 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
# Advanced keyword extraction configuration
alias Kreuzberg.ExtractionConfig
config = %ExtractionConfig{
keyword_extraction: %{
"enabled" => true,
"max_keywords" => 20,
"min_score" => 0.6,
"algorithm" => "tfidf"
}
}
{:ok, result} = Kreuzberg.extract_file("research_paper.pdf", nil, config)
if result.keywords do
# Group by score ranges
high_score = Enum.filter(result.keywords, fn kw -> kw["score"] >= 0.8 end)
medium_score = Enum.filter(result.keywords, fn kw -> kw["score"] >= 0.6 and kw["score"] < 0.8 end)
IO.puts("High confidence keywords (#{length(high_score)}):")
Enum.each(high_score, fn kw -> IO.puts(" - #{kw["word"]} (#{kw["score"]})") end)
end