gnes.indexer.base module

class gnes.indexer.base.BaseIndexer(*args, **kwargs)[source]

Bases: gnes.base.TrainableBase

add(keys: Any, docs: Any, weights: List[float], *args, **kwargs)[source]
normalize_score(*args, **kwargs)[source]
query(keys: Any, *args, **kwargs) → List[Any][source]
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.indexer.base.BaseKeyIndexer(*args, **kwargs)[source]

Bases: gnes.indexer.base.BaseIndexer

add(keys: List[Tuple[int, int]], weights: List[float], *args, **kwargs) → int[source]
query(keys: List[int], *args, **kwargs) → List[Tuple[int, int, float]][source]
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.indexer.base.BaseTextIndexer(*args, **kwargs)[source]

Bases: gnes.indexer.base.BaseIndexer

add(keys: List[int], docs: Any, weights: List[float], *args, **kwargs)[source]
query(keys: List[int], *args, **kwargs) → List[Any][source]
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.indexer.base.BaseVectorIndexer(*args, **kwargs)[source]

Bases: gnes.indexer.base.BaseIndexer

add(keys: List[Tuple[int, int]], vectors: numpy.ndarray, weights: List[float], *args, **kwargs)[source]
query()[source]
train(*args, **kwargs)

Train the model, need to be overrided

class gnes.indexer.base.JointIndexer(*args, **kwargs)[source]

Bases: gnes.base.CompositionalTrainableBase

add(keys: Any, docs: Any, *args, **kwargs) → None[source]
components
query()[source]
train(*args, **kwargs)

Train the model, need to be overrided