gensim.interfaces.TransformationABC

class gensim.interfaces.TransformationABC[source]

Interface for transformations. A ‘transformation’ is any object which accepts a sparse document via the dictionary notation [] and returns another sparse document in its stead:

>>> transformed_doc = transformation[doc]

or also:

>>> transformed_corpus = transformation[corpus]

See the gensim.models.tfidfmodel module for an example of a transformation.

Methods

load(fname[, mmap]) Load a previously saved object from file (also see save).
save(fname_or_handle[, separately, ...]) Save the object to file (also see load).