class Marisa::BytesTrie
- Marisa::BytesTrie
- Marisa::Trie
- Reference
- Object
Direct Known Subclasses
Defined in:
marisa/bytes_trie.crConstructors
Instance Method Summary
- #[](value)
- #[]=(key : String, value : String | Int32)
- #add_many(hash : Hash(String, String | Int32), weight = nil)
- #each_pairs(&block : Tuple(String, String | Int32) -> )
- #get(key : String) : String | Nil | Int32
-
#get_all(key : String) : Array(String | Int32)
Search for many results with a given prefix
- #include?(key : String) : Bool
- #set(key : String, value : String | Int32)
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)
#