class Qdrant::Api::Bm25Config

Overview

Configuration of the local bm25 models.

Included Modules

Defined in:

qdrant-api/models/bm25_config.cr

Constructors

Instance Method Summary

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

def self.new(ctx : YAML::ParseContext, node : YAML::Nodes::Node) #

[View source]
def self.new(pull : JSON::PullParser) #

[View source]
def self.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


[View source]
def self.new(*, __pull_for_json_serializable pull : JSON::PullParser) #

[View source]
def self.new(*, __context_for_yaml_serializable ctx : YAML::ParseContext, __node_for_yaml_serializable node : YAML::Nodes::Node) #

[View source]

Instance Method Detail

def ==(other : self) #
Description copied from class Reference

Returns true if this reference is the same as other. Invokes same?.


def ascii_folding : Bool | Nil #

If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default is false.


[View source]
def ascii_folding=(ascii_folding : Bool | Nil) #

If true, normalize tokens by folding accented characters to ASCII (e.g., "ação" -> "acao"). Default is false.


[View source]
def avg_len : Float64 | Nil #

Expected average document length in the collection. Default is 256.


[View source]
def avg_len=(avg_len : Float64 | Nil) #

Expected average document length in the collection. Default is 256.


[View source]
def b : Float64 | Nil #

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.


[View source]
def b=(b : Float64 | Nil) #

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.


[View source]
def hash(hasher) #
Description copied from class Reference

See Object#hash(hasher)


def k : Float64 | Nil #

Optional properties Controls term frequency saturation. Higher values mean term frequency has more impact. Default is 1.2


[View source]
def k=(k : Float64 | Nil) #

Optional properties Controls term frequency saturation. Higher values mean term frequency has more impact. Default is 1.2


[View source]
def language : String | Nil #

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.


[View source]
def language=(language : String | Nil) #

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.


[View source]
def list_invalid_properties #

Show invalid properties with the reasons. Usually used together with valid? @return Array for valid properties with the reasons


[View source]
def lowercase : Bool | Nil #

Lowercase the text before tokenization. Default is true.


[View source]
def lowercase=(lowercase : Bool | Nil) #

Lowercase the text before tokenization. Default is true.


[View source]
def max_token_len : Int32 | Nil #

Maximum token length to keep. If token is longer than this, it will be discarded. Default is None, which means no maximum length.


[View source]
def max_token_len=(value : Int32 | Nil) #

Maximum token length to keep. If token is longer than this, it will be discarded. Default is None, which means no maximum length.


[View source]
def max_token_len_validation_error(value) : String | Nil #

[View source]
def min_token_len : Int32 | Nil #

Minimum token length to keep. If token is shorter than this, it will be discarded. Default is None, which means no minimum length.


[View source]
def min_token_len=(value : Int32 | Nil) #

Minimum token length to keep. If token is shorter than this, it will be discarded. Default is None, which means no minimum length.


[View source]
def min_token_len_validation_error(value) : String | Nil #

[View source]
def stemmer : StemmingAlgorithm | Nil #

Configuration of the stemmer. Processes tokens to their root form. Default: initialized Snowball stemmer for specified #language or English if not specified.


[View source]
def stemmer=(stemmer : StemmingAlgorithm | Nil) #

Configuration of the stemmer. Processes tokens to their root form. Default: initialized Snowball stemmer for specified #language or English if not specified.


[View source]
def stopwords : StopwordsInterface | Nil #

Configuration of the stopwords filter. Supports list of pre-defined languages and custom stopwords. Default: initialized for specified #language or English if not specified.


[View source]
def stopwords=(stopwords : StopwordsInterface | Nil) #

Configuration of the stopwords filter. Supports list of pre-defined languages and custom stopwords. Default: initialized for specified #language or English if not specified.


[View source]
def tokenizer : TokenizerType | Nil #

[View source]
def tokenizer=(tokenizer : TokenizerType | Nil) #

[View source]
def valid? #

Check to see if the all the properties in the model are valid @return true if the model is valid


[View source]