eleve.c_memory
¶
Provide a C++ written Storage (eleve.c_memory.cmemory.MemoryStorage
)
and a Trie that store data in RAM. This backend is such more RAM efficient that
the basic implementation in Python, it is also much faster.
-
class
eleve.c_memory.cmemory.
MemoryStorage
¶ -
__init__
((object)arg1[, (int)default_ngram_length]) → None :¶ - C++ signature :
- void __init__(_object* [,unsigned long])
-
add_ngram
((MemoryStorage)arg1, (list)ngram[, (int)freq=1]) → None :¶ - C++ signature :
- void add_ngram(PyMemoryStorage {lvalue},boost::python::list [,int=1])
-
add_sentence
((MemoryStorage)arg1, (list)sentence[, (int)freq=1[, (int)ngram_length=0]]) → None :¶ - C++ signature :
- void add_sentence(PyMemoryStorage {lvalue},boost::python::list [,int=1 [,unsigned long=0]])
-
clear
((MemoryStorage)arg1) → None :¶ - C++ signature :
- void clear(PyMemoryStorage {lvalue})
-
close
((MemoryStorage)arg1) → None :¶ - C++ signature :
- void close(PyMemoryStorage {lvalue})
-
query_autonomy
((MemoryStorage)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_autonomy(PyMemoryStorage {lvalue},boost::python::list)
-
query_count
((MemoryStorage)arg1, (list)ngram) → int :¶ - C++ signature :
- unsigned int query_count(PyMemoryStorage {lvalue},boost::python::list)
-
query_entropy
((MemoryStorage)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_entropy(PyMemoryStorage {lvalue},boost::python::list)
-
query_ev
((MemoryStorage)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_ev(PyMemoryStorage {lvalue},boost::python::list)
-
update_stats
((MemoryStorage)arg1) → None :¶ - C++ signature :
- void update_stats(PyMemoryStorage {lvalue})
-
-
class
eleve.c_memory.cmemory.
MemoryTrie
¶ -
__init__
((object)arg1) → None :¶ - C++ signature :
- void __init__(_object*)
-
add_ngram
((MemoryTrie)arg1, (list)ngram[, (int)freq=1]) → None :¶ - C++ signature :
- void add_ngram(PyMemoryTrie {lvalue},boost::python::list [,int=1])
-
clear
((MemoryTrie)arg1) → None :¶ - C++ signature :
- void clear(PyMemoryTrie {lvalue})
-
close
((MemoryTrie)arg1) → None :¶ - C++ signature :
- void close(PyMemoryTrie {lvalue})
-
max_depth
((MemoryTrie)arg1) → int :¶ - C++ signature :
- unsigned long max_depth(PyMemoryTrie {lvalue})
-
query_autonomy
((MemoryTrie)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_autonomy(PyMemoryTrie {lvalue},boost::python::list)
-
query_count
((MemoryTrie)arg1, (list)ngram) → int :¶ - C++ signature :
- unsigned int query_count(PyMemoryTrie {lvalue},boost::python::list)
-
query_entropy
((MemoryTrie)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_entropy(PyMemoryTrie {lvalue},boost::python::list)
-
query_ev
((MemoryTrie)arg1, (list)ngram) → float :¶ - C++ signature :
- float query_ev(PyMemoryTrie {lvalue},boost::python::list)
-
update_stats
((MemoryTrie)arg1) → None :¶ - C++ signature :
- void update_stats(PyMemoryTrie {lvalue})
-