[Hejes-devel] [873] more bugs out of the way - there was a memcopy problem in cartese and a spelling problem for words split by * as per lex7

hejes-devel at nytud.hu hejes-devel at nytud.hu
Sun Jul 28 12:53:06 CEST 2013


Revision: 873
Author:   hussami
Date:     2013-07-28 12:53:06 +0200 (Sun, 28 Jul 2013)
Log Message:
-----------
more bugs out of the way - there was a memcopy problem in cartese and a spelling problem for words split by * as per lex7

Modified Paths:
--------------
    trunk/misc/osiris_xml/ohanalyze.py

Modified: trunk/misc/osiris_xml/ohanalyze.py
===================================================================
--- trunk/misc/osiris_xml/ohanalyze.py	2013-07-28 10:32:00 UTC (rev 872)
+++ trunk/misc/osiris_xml/ohanalyze.py	2013-07-28 10:53:06 UTC (rev 873)
@@ -351,7 +351,7 @@
       return 1
 
     tags = [y for _,y,_ in relevant]
-    forms = [y.replace("8", "") for y,_,_ in relevant]
+    forms = [y.replace("*", "") for y,_,_ in relevant]
     lens = [len(y) for y in forms]
     if len(tags) != len(forms) or len(tags) != len(lens):
       raise Exception(str(tags) + " vs " + str(forms))
@@ -431,6 +431,7 @@
         curindex = previndex + v
         prl.append(s[previndex:curindex])
         previndex = curindex
+      print "prl=", prl
       print "\t" + "+".join(prl)
 
   def getFinalSplits(self, s, splits):
@@ -455,25 +456,26 @@
     if len(lst) == 1:
       return lst[0]
 
+#    print "CARTESE INPUT", lst
     result = []
     nl = self.cartese(lst[1:])
 #    print dictlist
-#    print nl
+#    print "NL=", nl
 #    print dictlist[0]
     for cark in lst[0]:
       for nelt in nl:
-        loclist = cark
+        loclist = cark[:]
         loclist.extend(nelt)
-        result.append(loclist)
-#    print result
+        result.append(copy.deepcopy(loclist))
+#    print "CARTESE:", result
     return result
 
   def try2(self, where):
 
 #    query = "select id, actual, norm from ohdict where id > 1000 limit 500";
-    query = "select id, actual, norm from ohdict where id > 1212 limit 2";
+#    query = "select id, actual, norm from ohdict where id > 1129 limit 2";
 #    query = "select id, actual, norm from ohdict order by id asc";
-#    query = "select id, actual, norm from ohdict where id > 0 and id not in (253, 1617, 10954, 10962, 14118, 21042, 26766, 28090, 31341, 35355, 41501, 41502, 41503, 53195, 63253, 66216, 66217, 68562, 69228, 69229, 72479, 72480, 72481, 72482, 72483, 72484, 72565, 79810, 79812, 81608, 81609, 82178, 82181, 104301, 107148, 110649, 112890) order by id asc";
+    query = "select id, actual, norm from ohdict where id > 0 and id not in (253, 1617, 10954, 10962, 14118, 21042, 26766, 28090, 31341, 35355, 41501, 41502, 41503, 53195, 63253, 66216, 66217, 68562, 69228, 69229, 72479, 72480, 72481, 72482, 72483, 72484, 72565, 79810, 79812, 81608, 81609, 82178, 82181, 104301, 107148, 110649, 112890) order by id asc";
 #107148: recursion depth!
     self.db.execute(query)
 




More information about the Hejes-devel mailing list