def get_features(self, context_obj):
        if 'token' not in context_obj or len(context_obj['token']) == 0:
            print("No token in context object ", context_obj)
            sys.exit()
        if 'index' not in context_obj or len(context_obj['index']) == 0:
            print("No index in context object ", context_obj)
            sys.exit()

        if context_obj['index'][0] == context_obj['index'][1]:
            print("Invalid token indices in sentence: ", context_obj['target'])
            print("Indices: {}, {}".format(context_obj['index'][0], context_obj['index'][1]))

        phrase_vector = []
        # if 'token' contains more than 1 string, 'index' should be an interval
        if type(context_obj['token']) is list or type(context_obj['token']) is np.ndarray:
            left_window = left_context(context_obj['target'], context_obj['token'][0], self.context_size, context_obj['index'][0])
            right_window = right_context(context_obj['target'], context_obj['token'][-1], self.context_size, context_obj['index'][-1]-1)
            phrase_vector = [self.extract_word2vec_vector(tok) for tok in context_obj['token']]
            phrase_vector = self.combine(phrase_vector, axis=0)
        else:
            left_window = left_context(context_obj['target'], context_obj['token'], self.context_size, context_obj['index'])
            right_window = right_context(context_obj['target'], context_obj['token'], self.context_size, context_obj['index'])
            phrase_vector = self.extract_word2vec_vector(context_obj['token'])

        vector = []
        for tok in left_window:
            vector.extend(self.extract_word2vec_vector(tok))
        vector.extend(phrase_vector)
        for tok in right_window:
            vector.extend(self.extract_word2vec_vector(tok))
        return np.hstack(vector)

    # TODO: there should be a name for every feature
dataset/ETHPy150Open qe-team/marmot/marmot/features/word2vec_feature_extractor.py/Word2VecFeatureExtractor.get_features/original