sourced.ml.core.models.id2vec

Module Contents

class sourced.ml.core.models.id2vec.Id2Vec[source]

Bases:modelforge.Model

id2vec model - source code identifier embeddings.

NAME = id2vec[source]
VENDOR = source{d}[source]
DESCRIPTION = Model that contains information on source code as identifier embeddings.[source]
LICENSE[source]
embeddings[source]

numpy.ndarray with the embeddings of shape (N tokens x embedding dims).

tokens[source]

List with the processed source code identifiers.

construct(self, embeddings, tokens)[source]
dump(self)[source]
items(self)[source]

Returns the tuples belonging to token -> index mapping.