lookout.style.typos.corrector_manager

Defines TyposCorrectorManager - the storage of TyposCorrector instances which is intended to be used globally.

Module Contents

class lookout.style.typos.corrector_manager.TyposCorrectorManager

Maintains the mapping from model sources to the corresponding loaded TyposCorrector objects.

get(self, source:str, processes_number:int)

Return the loaded TyposCorrector model for the specified model source.

Parameters:
  • source – UUID or file path.
  • processes_number – Number of processes for multiprocessing.
Returns:

TyposCorrector.

warmup(self, sources:Iterable[str])

Force load several models specified in the arguments.

Parameters:sources – Model sources.
Returns:Nothing