deeppavlov/models/spelling_correction/levenshtein/levenshtein_searcher.py
def _make_reversed_operation_costs(self):
        """
        Заполняет массив _reversed_operation_costs
        на основе имеющегося массива operation_costs
        """
        _reversed_operation_costs = dict()
        for up, costs in self.operation_costs.items():
            for low, cost in costs.items():
                if low not in _reversed_operation_costs:
                    _reversed_operation_costs[low] = dict()
                _reversed_operation_costs[low][up] = cost
        self._reversed_operation_costs = _reversed_operation_costs
def _make_reversed_operation_costs(self):
        """
        Заполняет массив _reversed_operation_costs
        на основе имеющегося массива operation_costs
        """
        _reversed_operation_costs = dict()
        for up, costs in self.operation_costs.items():
            for low, cost in costs.items():
                if low not in _reversed_operation_costs:
                    _reversed_operation_costs[low] = dict()
                _reversed_operation_costs[low][up] = cost
        self._reversed_operation_costs = _reversed_operation_costs
def _make_reversed_operation_costs ( self ) : _reversed_operation_costs = dict ( ) for up , costs in self . operation_costs . items ( ) : for low , cost in costs . items ( ) : if low not in _reversed_operation_costs : _reversed_operation_costs [ low ] = dict ( ) _reversed_operation_costs [ low ] [ up ] = cost self . _reversed_operation_costs = _reversed_operation_costs
Заполняет массив _reversed_operation_costs
        на основе имеющегося массива operation_costs
Заполняет массив _reversed_operation_costs на основе имеющегося массива operation_costs