def process_xml(xml_string): """Return a TripsProcessor by processing a TRIPS EKB XML string. Parameters ---------- xml_string : str A TRIPS extraction knowledge base (EKB) string to be processed. http://trips.ihmc.us/parser/api.html Returns ------- tp : TripsProcessor A TripsProcessor containing the extracted INDRA Statements in tp.statements. """ tp = TripsProcessor(xml_string) if tp.tree is None: return None tp.get_activations_causal() tp.get_activations_stimulate() tp.get_complexes() tp.get_modifications() tp.get_active_forms() tp.get_active_forms_state() tp.get_activations() tp.get_translocation() tp.get_regulate_amounts() tp.get_degradations() tp.get_syntheses() return tp
def process_xml(xml_string): """Return a TripsProcessor by processing a TRIPS EKB XML string. Parameters ---------- xml_string : str A TRIPS extraction knowledge base (EKB) string to be processed. http://trips.ihmc.us/parser/api.html Returns ------- tp : TripsProcessor A TripsProcessor containing the extracted INDRA Statements in tp.statements. """ tp = TripsProcessor(xml_string) if tp.tree is None: return None tp.get_activations_causal() tp.get_activations_stimulate() tp.get_complexes() tp.get_modifications() tp.get_active_forms() tp.get_active_forms_state() tp.get_activations() tp.get_translocation() tp.get_degradations() tp.get_syntheses() return tp