class
Qdrant::Api::Bm25Config
- Qdrant::Api::Bm25Config
- Reference
- Object
Overview
Configuration of the local bm25 models.
Included Modules
- JSON::Serializable
- Qdrant::Api::Serializable
- Qdrant::Api::Validation
- YAML::Serializable
Defined in:
qdrant-api/models/bm25_config.crConstructors
- .new(ctx : YAML::ParseContext, node : YAML::Nodes::Node)
- .new(pull : JSON::PullParser)
-
.new(k : Float64 | Nil = 1.2, b : Float64 | Nil = 0.75, avg_len : Float64 | Nil = 256, tokenizer : TokenizerType | Nil = nil, language : String | Nil = nil, lowercase : Bool | Nil = nil, ascii_folding : Bool | Nil = nil, stopwords : StopwordsInterface | Nil = nil, stemmer : StemmingAlgorithm | Nil = nil, min_token_len : Int32 | Nil = nil, max_token_len : Int32 | Nil = nil)
Initializes the object @param [Hash] attributes Model attributes in the form of hash
- .new(*, __pull_for_json_serializable pull : JSON::PullParser)
- .new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node)
Instance Method Summary
-
#==(other : self)
Returns
trueif this reference is the same as other. -
#ascii_folding : Bool | Nil
If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao").
-
#ascii_folding=(ascii_folding : Bool | Nil)
If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao").
-
#avg_len : Float64 | Nil
Expected average document length in the collection.
-
#avg_len=(avg_len : Float64 | Nil)
Expected average document length in the collection.
-
#b : Float64 | Nil
Controls document length normalization.
-
#b=(b : Float64 | Nil)
Controls document length normalization.
-
#hash(hasher)
See
Object#hash(hasher) -
#k : Float64 | Nil
Optional properties Controls term frequency saturation.
-
#k=(k : Float64 | Nil)
Optional properties Controls term frequency saturation.
-
#language : String | Nil
Defines which language to use for text preprocessing.
-
#language=(language : String | Nil)
Defines which language to use for text preprocessing.
-
#list_invalid_properties
Show invalid properties with the reasons.
-
#lowercase : Bool | Nil
Lowercase the text before tokenization.
-
#lowercase=(lowercase : Bool | Nil)
Lowercase the text before tokenization.
-
#max_token_len : Int32 | Nil
Maximum token length to keep.
-
#max_token_len=(value : Int32 | Nil)
Maximum token length to keep.
- #max_token_len_validation_error(value) : String | Nil
-
#min_token_len : Int32 | Nil
Minimum token length to keep.
-
#min_token_len=(value : Int32 | Nil)
Minimum token length to keep.
- #min_token_len_validation_error(value) : String | Nil
-
#stemmer : StemmingAlgorithm | Nil
Configuration of the stemmer.
-
#stemmer=(stemmer : StemmingAlgorithm | Nil)
Configuration of the stemmer.
-
#stopwords : StopwordsInterface | Nil
Configuration of the stopwords filter.
-
#stopwords=(stopwords : StopwordsInterface | Nil)
Configuration of the stopwords filter.
- #tokenizer : TokenizerType | Nil
- #tokenizer=(tokenizer : TokenizerType | Nil)
-
#valid?
Check to see if the all the properties in the model are valid @return true if the model is valid
Macros inherited from module Qdrant::Api::Validation
validates(name, klass, nilable, **rules)
validates
Instance methods inherited from module Qdrant::Api::Serializable
eql?(other)
eql?,
to_body : Hash(String, JSON::Any)
to_body,
to_h : Hash(String, JSON::Any)
to_h,
to_s(io : IO) : Nil
to_s
Constructor Detail
Initializes the object @param [Hash] attributes Model attributes in the form of hash
Instance Method Detail
Returns true if this reference is the same as other. Invokes same?.
If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default is false.
If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default is false.
Expected average document length in the collection. Default is 256.
Controls document length normalization. Ranges from 0 (no normalization) to 1 (full normalization). Higher values mean longer documents have less impact. Default is 0.75.
Controls document length normalization. Ranges from 0 (no normalization) to 1 (full normalization). Higher values mean longer documents have less impact. Default is 0.75.
Optional properties Controls term frequency saturation. Higher values mean term frequency has more impact. Default is 1.2
Optional properties Controls term frequency saturation. Higher values mean term frequency has more impact. Default is 1.2
Defines which language to use for text preprocessing. This parameter is used to construct default stopwords filter and stemmer. To disable language-specific processing, set this to \"language\": \"none\". If not specified, English is assumed.
Defines which language to use for text preprocessing. This parameter is used to construct default stopwords filter and stemmer. To disable language-specific processing, set this to \"language\": \"none\". If not specified, English is assumed.
Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons
Maximum token length to keep. If token is longer than this, it will be discarded. Default is None, which means no maximum length.
Maximum token length to keep. If token is longer than this, it will be discarded. Default is None, which means no maximum length.
Minimum token length to keep. If token is shorter than this, it will be discarded. Default is None, which means no minimum length.
Minimum token length to keep. If token is shorter than this, it will be discarded. Default is None, which means no minimum length.
Configuration of the stemmer. Processes tokens to their root form. Default: initialized Snowball stemmer for specified #language or English if not specified.
Configuration of the stemmer. Processes tokens to their root form. Default: initialized Snowball stemmer for specified #language or English if not specified.
Configuration of the stopwords filter. Supports list of pre-defined languages and custom stopwords. Default: initialized for specified #language or English if not specified.
Configuration of the stopwords filter. Supports list of pre-defined languages and custom stopwords. Default: initialized for specified #language or English if not specified.
Check to see if the all the properties in the model are valid @return true if the model is valid