diff --git a/UD_any/data/getTransitionSets.py b/UD_any/data/getTransitionSets.py index 53cf9e1f722fa448262dfc90313b56695ab16ebf..231de1f591ffc8e97d56693774de5ed3fadd8c7d 100755 --- a/UD_any/data/getTransitionSets.py +++ b/UD_any/data/getTransitionSets.py @@ -91,17 +91,6 @@ if __name__ == "__main__" : output = open("parser_eager_rel_relaxed.ts", 'w', encoding='utf-8') print("<parser> REDUCE_relaxed", file=output) - labels = set() - labelsList = [] - for line in open(colFile, "r", encoding='utf-8') : - striped = line.strip() - if len(striped) == 0 or striped == "root" or striped == "_" : - continue - label = striped - if label not in labels : - labels.add(striped) - labelsList.append(striped) - labelsList.sort() for label in labelsList : print("<parser> eager_LEFT_rel " + label, file=output) print("<parser> eager_RIGHT_rel " + label, file=output) @@ -122,6 +111,19 @@ if __name__ == "__main__" : print("<parser> SHIFT", file=output) output.close() + output = open("parser_standard_rel.ts", 'w', encoding='utf-8') + for label in labelsList : + print("<parser> standard_LEFT_rel " + label, file=output) + print("<parser> standard_RIGHT_rel " + label, file=output) + print("<parser> SHIFT", file=output) + output.close() + + output = open("parser_standard.ts", 'w', encoding='utf-8') + print("<parser> standard_LEFT_rel", file=output) + print("<parser> standard_RIGHT_rel", file=output) + print("<parser> SHIFT", file=output) + output.close() + output = open("deprel.ts", 'w', encoding='utf-8') for label in labelsList : print("deprel " + label, file=output)