

def get_features(self, context_obj):
    idx = context_obj['index']
    left_ngram = (left_context(context_obj['target'], context_obj['token'], context_size=(self.order - 1), idx=idx) + [context_obj['token']])
    right_ngram = ([context_obj['token']] + right_context(context_obj['target'], context_obj['token'], context_size=(self.order - 1), idx=idx))
    left_ngram_order = self.check_lm(left_ngram, side='left')
    right_ngram_order = self.check_lm(right_ngram, side='right')
    left_trigram = (left_context(context_obj['target'], context_obj['token'], context_size=2, idx=idx) + [context_obj['token']])
    middle_trigram = extract_window(backoff_right['target'], context_obj['token'], idx=idx)
    right_trigram = ([context_obj['token']] + right_context(context_obj['target'], context_obj['token'], context_size=2, idx=idx))
    backoff_left = self.get_backoff(left_trigram)
    backoff_middle = self.get_backoff(middle_trigram)
    backoff_right = self.get_backoff(right_trigram)
    return [left_ngram_order, right_ngram_order, backoff_left, backoff_middle, backoff_right]

dataset/ETHPy150Open qe-team/marmot/marmot/features/lm_feature_extractor.py LMFeatureExtractor.get_features/VarMisuse@157/240 `context_obj`->`backoff_right`