ExNlp.Ranking.Bm25Options (ex_nlp v0.1.0)
View SourceConfiguration options for BM25 ranking algorithm.
Summary
Functions
Merges options, with new options taking precedence.
Creates BM25 options from keyword list.
Types
@type t() :: %ExNlp.Ranking.Bm25Options{ b: float(), k1: float(), processing: ExNlp.Ranking.ProcessingOptions.t() }
Functions
Merges options, with new options taking precedence.
Creates BM25 options from keyword list.
Processing options can be specified directly and will be merged.
Examples
# Simple usage
iex> opts = ExNlp.Ranking.Bm25Options.new(k1: 1.5, b: 0.8)
iex> opts.k1
1.5
# With processing options
iex> opts = ExNlp.Ranking.Bm25Options.new(
...> k1: 1.5,
...> stem: true,
...> language: :french,
...> remove_stopwords: true
...> )
iex> opts.processing.stem
true