def extract_features_raw(self, inputs):
        if not "tokens" in inputs:
            raise ValueError("inputs must be a parse containing `tokens` field!")

        graph = build_graph_with_srl(inputs,
                                     add_rel_between_args=False,
                                     include_prev_verb_rel=False)

        return graph
def get_srl_interactions(parse_json, srl_interaction_vocab):
    graph = build_graph_with_srl(parse_json,
                                 add_rel_between_args=True,
                                 include_prev_verb_rel=False)

    context_size = sum([len(sent["tokens"]) for sent in parse_json["sentences"]])
    tokenwise_labels = convert_srl_graph_to_token_interactions(context_size, graph, srl_interaction_vocab)

    del graph

    return tokenwise_labels