From 30726eaa7c90e7b9337ba36f78b2b8eab24ea17c Mon Sep 17 00:00:00 2001
From: Franck Dary <franck.dary@lis-lab.fr>
Date: Thu, 14 May 2020 15:55:32 +0200
Subject: [PATCH] generatig ts

---
 UD_any/data/getTransitionSets.py | 24 +++++++++++++-----------
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/UD_any/data/getTransitionSets.py b/UD_any/data/getTransitionSets.py
index 53cf9e1..231de1f 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)
-- 
GitLab