Grammalecte  Changes On Branch fea8454d8e6cfe5f

Changes In Branch genfrdic Through [fea8454d8e] Excluding Merge-Ins

This is equivalent to a diff from 80a7b8c83d to fea8454d8e

2017-06-08
17:52
[fr][build] merge genfrdic check-in: 3a75d57243 user: olr tags: fr, trunk
16:34
[fr] genfrdic.py: copie des fichiers dans Grammalecte optionnelle check-in: 0f3ea1379e user: olr tags: fr, genfrdic
16:18
[fr] genfrdic.py: fonctions inutiles check-in: fea8454d8e user: olr tags: fr, genfrdic
05:03
[fr] correction bug regex sur taux de qqch check-in: 80a7b8c83d user: olr tags: fr, trunk
04:33
[fr] pt: taux de qqch check-in: 9cea3ed48a user: olr tags: fr, trunk

Modified gc_lang/fr/dictionnaire/genfrdic.py from [38f9af18d9] to [d1ed2a594a].

805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
805
806
807
808
809
810
811



812
813
814
815
816
817
818







-
-
-







        if self.err:
            echo("\n## Erreur dans le dictionnaire : {}".format(self.err))
            echo("   dans : " + self.lemma)
                
    def __str__ (self):
        return "{0.lemma}/{0.flags} {1}".format(self, self.getMorph(2))

    def display (self):
        echo(self.__str__())

    def check (self):
        sErr = ''
        if self.lemma == '':
            sErr += 'lemme vide'
        if not re.match(r"[a-zA-ZéÉôÔàâÂîÎïèÈêÊÜœŒæÆçÇ0-9µåÅΩ&αβγδεζηθικλμνξοπρστυφχψωΔℓΩ_]", self.lemma):
            sErr += 'premier caractère inconnu: ' + self.lemma[0]
        if re.search(r"\s$", self.lemma):
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1187
1188
1189
1190
1191
1192
1193



1194
1195
1196
1197
1198
1199
1200







-
-
-








    def __str__ (self, oStatsLex):
        sOccurs = ''
        for v in oStatsLex.dFlexions[self.sFlexion]:
            sOccurs += str(v) + "\t"
        return "{0.oEntry.iD}\t{0.sFlexion}\t{0.oEntry.sRadical}\t{0.sMorph}\t{0.metagfx}\t{0.metaph2}\t{0.oEntry.lx}\t{0.oEntry.se}\t{0.oEntry.et}\t{0.oEntry.di}{2}\t{1}{0.nOccur}\t{0.nDup}\t{0.nMulti}\t{0.fFreq:.15f}\t{0.cFq}\n".format(self, sOccurs, "/"+self.cDic if self.cDic != "*" else "")

    def display (self):
        echo(self.__str__())

    @classmethod
    def simpleHeader (cls):
        return "# :POS ;LEX ~SEM =FQ /DIC\n"

    def getGrammarCheckerRepr (self):
        return "{0.sFlexion}\t{0.oEntry.lemma}\t{1}\n".format(self, self._getSimpleTags())