Grammalecte  Diff

Differences From Artifact [2922c13402]:

To Artifact [182863e043]:


   153    153           return self.__str__() == other.__str__()        
   154    154   
   155    155       def getNodeAsDict (self):
   156    156           "returns the node as a dictionary structure"
   157    157           dNode = {}
   158    158           dReValue = {}
   159    159           dReMorph = {}
   160         -        dRules = {}
   161         -        dLemmas = {}
          160  +        dRule = {}
          161  +        dLemma = {}
          162  +        dMeta = {}
   162    163           for sArc, oNode in self.dArcs.items():
   163    164               if sArc.startswith("@") and len(sArc) > 1:
   164    165                   dReMorph[sArc[1:]] = oNode.__hash__()
   165    166               elif sArc.startswith("~") and len(sArc) > 1:
   166    167                   dReValue[sArc[1:]] = oNode.__hash__()
   167    168               elif sArc.startswith(">") and len(sArc) > 1:
   168         -                dLemmas[sArc[1:]] = oNode.__hash__()
          169  +                dLemma[sArc[1:]] = oNode.__hash__()
          170  +            elif sArc.startswith("*") and len(sArc) > 1:
          171  +                dMeta[sArc[1:]] = oNode.__hash__()
   169    172               elif sArc.startswith("##"):
   170         -                dRules[sArc[1:]] = oNode.__hash__()
          173  +                dRule[sArc[1:]] = oNode.__hash__()
   171    174               else:
   172    175                   dNode[sArc] = oNode.__hash__()
   173    176           if dReValue:
   174    177               dNode["<re_value>"] = dReValue
   175    178           if dReMorph:
   176    179               dNode["<re_morph>"] = dReMorph
   177         -        if dLemmas:
   178         -            dNode["<lemmas>"] = dLemmas
   179         -        if dRules:
   180         -            dNode["<rules>"] = dRules
          180  +        if dLemma:
          181  +            dNode["<lemmas>"] = dLemma
          182  +        if dMeta:
          183  +            dNode["<meta>"] = dMeta
          184  +        if dRule:
          185  +            dNode["<rules>"] = dRule
   181    186           #if self.bFinal:
   182    187           #    dNode["<final>"] = 1
   183    188           return dNode