class Marisa::BytesTrie

Direct Known Subclasses

Defined in:

marisa/bytes_trie.cr

Constructors

Instance Method Summary

Instance methods inherited from class Marisa::Trie

<<(value) : self <<, add(key : String, weight : Int32 | Nil = nil) add, add_many(keys : Array(String), weights : Array(Float32) = [] of Array(Float32)) add_many, agent : Wrapper::Agent agent, build build, build_if_necessary build_if_necessary, built? : Bool built?, each(&block : String -> ) each, get_id(key : String) : UInt64 | Nil get_id, get_key(id : UInt64) : String | Nil get_key, get_weight(key : String) : Float32 | Nil get_weight, has_keys? : Bool has_keys?, include?(key : String) : Bool include?, keys : Array(String) keys, load(path : String) load, save(path : String) save, search(prefix : String = "") : Search search, size : UInt64 size, trie : Wrapper::Trie trie

Constructor methods inherited from class Marisa::Trie

new(keys = [] of String, weights = [] of Float32, binary : Bool = false, num_tries : Symbol | Int32 = :default, cache_size : Symbol = :normal, order : Symbol = :label) new

Instance methods inherited from module Marisa::BaseConfigFlags

binary_flag(bool : Bool) : Int32 binary_flag, config_flags(binary = false, num_tries = :default, cache_size = :default, order = :default) config_flags, lookup_cache_size(cache_size : Symbol) : Int32 lookup_cache_size, valid_node_order(order : Symbol) : Int32 valid_node_order, valid_num_tries(num_tries : Int32 | Symbol) : Int32 valid_num_tries

Constructor Detail

def self.new(hash = {} of String => String | Int32, separator : String = VALUE_SEPARATOR, binary : Bool = false, num_tries : Symbol | Int32 = :default, cache_size = :normal, order = :label) #

Instance Method Detail

def [](value) #

def []=(key : String, value : String | Int32) #

def add_many(hash : Hash(String, String | Int32), weight = nil) #

def each_pairs(&block : Tuple(String, String | Int32) -> ) #

def get(key : String) : String | Nil | Int32 #

def get_all(key : String) : Array(String | Int32) #

Search for many results with a given prefix


def include?(key : String) : Bool #

def set(key : String, value : String | Int32) #