@classmethod
    def helperConsItem(cls, is_last_cell, cell_type, cell_span, \
                        goalTgt, anteHyps, anteItemStates):

        anteTgts = []
        for tgt in anteHyps:
            anteTgts.append( tgt.split() )

        tgt = ''
        lm_indx = 0
        consItemStates = []          # List of objects of type 'ConsequentItem'
        for lm_obj in cls.lmLst:
            anteItems = [x[lm_indx] for x in anteItemStates]
            cons_item = ConsequentItem(goalTgt)
            cons_item.setStateNMerge(is_last_cell, cell_type, cell_span, anteTgts, anteItems)
            tgt = cons_item.mergeAntecedents(anteHyps, anteItems, lm_obj.lm_order, lm_obj)
            if LanguageModelManager.debug:
                if lm_indx > 0:
                    assert (prev_tgt == tgt), "The target hypotheses from different LMs are not same: %s :: %s" % (prev_tgt, tgt)
                prev_tgt = tgt
            consItemStates.append(cons_item)
            lm_indx += 1

        return tgt, consItemStates
dataset/ETHPy150Open sfu-natlang/Kriya/src/Kriya-Decoder/languageModelManager.py/LanguageModelManager.helperConsItem/original