Grammalecte  Diff

Differences From Artifact [2922c13402]:

To Artifact [182863e043]:


153
154
155
156
157
158
159
160
161



162
163
164
165
166
167
168



169
170

171
172
173
174
175
176
177
178
179
180






181
182
183
153
154
155
156
157
158
159


160
161
162
163
164
165
166
167
168

169
170
171
172

173
174
175
176
177
178
179




180
181
182
183
184
185
186
187
188







-
-
+
+
+






-
+
+
+

-
+






-
-
-
-
+
+
+
+
+
+



        return self.__str__() == other.__str__()        

    def getNodeAsDict (self):
        "returns the node as a dictionary structure"
        dNode = {}
        dReValue = {}
        dReMorph = {}
        dRules = {}
        dLemmas = {}
        dRule = {}
        dLemma = {}
        dMeta = {}
        for sArc, oNode in self.dArcs.items():
            if sArc.startswith("@") and len(sArc) > 1:
                dReMorph[sArc[1:]] = oNode.__hash__()
            elif sArc.startswith("~") and len(sArc) > 1:
                dReValue[sArc[1:]] = oNode.__hash__()
            elif sArc.startswith(">") and len(sArc) > 1:
                dLemmas[sArc[1:]] = oNode.__hash__()
                dLemma[sArc[1:]] = oNode.__hash__()
            elif sArc.startswith("*") and len(sArc) > 1:
                dMeta[sArc[1:]] = oNode.__hash__()
            elif sArc.startswith("##"):
                dRules[sArc[1:]] = oNode.__hash__()
                dRule[sArc[1:]] = oNode.__hash__()
            else:
                dNode[sArc] = oNode.__hash__()
        if dReValue:
            dNode["<re_value>"] = dReValue
        if dReMorph:
            dNode["<re_morph>"] = dReMorph
        if dLemmas:
            dNode["<lemmas>"] = dLemmas
        if dRules:
            dNode["<rules>"] = dRules
        if dLemma:
            dNode["<lemmas>"] = dLemma
        if dMeta:
            dNode["<meta>"] = dMeta
        if dRule:
            dNode["<rules>"] = dRule
        #if self.bFinal:
        #    dNode["<final>"] = 1
        return dNode