def test_ted(): while True: cmd1 = input(">cmd1: ") cmd2 = input(">cmd2: ") ast1 = data_tools.bash_parser(cmd1) ast2 = data_tools.bash_parser(cmd2) dist = zss.simple_distance(ast1, ast2, nast.Node.get_children, nast.Node.get_label, tree_dist.temp_local_dist) print("ted = {}".format(dist)) print()
def test_ted(): while True: cmd1 = raw_input(">cmd1: ") cmd2 = raw_input(">cmd2: ") ast1 = data_tools.bash_parser(cmd1) ast2 = data_tools.bash_parser(cmd2) dist = zss.simple_distance( ast1, ast2, nast.Node.get_children, nast.Node.get_label, ast_based.temp_local_dist ) print("ted = {}".format(dist)) print()
def temp_dist(ast1, ast2): return zss.simple_distance(ast1, ast2, nast.Node.get_children, nast.Node.get_label, temp_local_dist)