unicode_fol_kit.sanitize_names¶
- unicode_fol_kit.sanitize_names(node, mapping=None)[source]¶
Return
(sanitized_node, mapping)with all names rewritten to legal tokens.parse(sanitized_node.to_unicode_str()) == sanitized_nodeholds for the defaultMSFLParser(FOL mode). Already-legal names are unchanged. Pass the returnedmappingback in (mapping=…) to keep names consistent across formulas of one problem; useNameMapping.reverse()to recover the originals.