reserved_predicates = get_reserved_preds_from_coq_static_lib(coq_static_lib_path)
required_predicates = []
for ccg_xml_tree in ccg_xml_trees:
tokens_node = ccg_xml_tree.find(".//tokens")
tokens = [token.get("base") for token in tokens_node]
required_predicates.extend(tokens)
required_predicates = list(set(required_predicates))
// Library entries are of the form:
After Change
def merge_dynamic_libraries(coq_lib, nltk_lib, coq_static_lib_path, doc):
reserved_predicates = get_reserved_preds_from_coq_static_lib(coq_static_lib_path)
required_predicates = set(normalize_token(t) for t in doc.xpath("//token/@base"))
coq_lib_index = {coq_lib_entry.split()[1] : coq_lib_entry \
for coq_lib_entry in coq_lib}
nltk_lib_index = {nltk_lib_entry.split()[1] : nltk_lib_entry \