Grammalecte  Check-in [843c18f516]

Overview
Comment:[lo] enumerator of words: better count of words
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | lo
Files: files | file ages | folders
SHA3-256: 843c18f516fabbfdf09c2de56a6a27276ea2bf52cea1dac4fb65b725fbbf1a6e
User & Date: olr on 2020-04-24 05:16:32
Other Links: manifest | tags
Context
2020-04-24
07:42
[fr] ajustements check-in: 03615d9898 user: olr tags: trunk, fr
05:16
[lo] enumerator of words: better count of words check-in: 843c18f516 user: olr tags: trunk, lo
2020-04-23
17:10
[fr] màj mémo sur la langue française check-in: d6a264061a user: olr tags: trunk, fr
Changes

Modified gc_lang/fr/oxt/Lexicographer/Enumerator.py from [a41a391c7b] to [6f8637a9b7].

306
307
308
309
310
311
312






313

314
315
316
317
318
319
320
        i = 0
        nTotOccur = 0
        for sWord, nOccur in sorted(self.dWord.items(), key=lambda t: t[1], reverse=True):
            xGridDataModel.addRow(i, (sWord, nOccur))
            self.xProgressBar.ProgressValue += 1
            i += 1
            nTotOccur += nOccur






            if sWord.lower().endswith(("-je", "-tu", "-il", "-elle", "-on", "-nous", "-vous", "-ils", "-elles", "-iel", "-iels")):

                nTotOccur += nOccur
        self.xProgressBar.ProgressValue = self.xProgressBar.ProgressValueMax
        self.xNumWord.Label = str(i)
        self.xTotWord.Label = nTotOccur

    def export (self):
        if not self.dWord:







>
>
>
>
>
>
|
>







306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
        i = 0
        nTotOccur = 0
        for sWord, nOccur in sorted(self.dWord.items(), key=lambda t: t[1], reverse=True):
            xGridDataModel.addRow(i, (sWord, nOccur))
            self.xProgressBar.ProgressValue += 1
            i += 1
            nTotOccur += nOccur
            sWord = sWord.lower()
            if sWord.endswith(("-le-moi", "-le-toi", "-le-nous", "-le-vous", "le-lui", "-le-leur", \
                               "-la-moi", "-la-toi", "-la-nous", "-la-vous", "la-lui", "-la-leur", \
                               "-les-moi", "-les-toi", "-les-nous", "-les-vous", "les-lui", "-les-leur", \
                               "-m’en", "-t’en", "-lui-en", "-nous-en", "vous-en", "-leur-en")):
                nTotOccur += nOccur + nOccur
            elif sWord.endswith(("-je", "-tu", "-il", "-elle", "-on", "-nous", "-vous", "-ils", "-elles", "-iel", "-iels", "-le", \
                                 "-la", "-les", "-moi", "-toi", "-leur", "-en", "-y")):
                nTotOccur += nOccur
        self.xProgressBar.ProgressValue = self.xProgressBar.ProgressValueMax
        self.xNumWord.Label = str(i)
        self.xTotWord.Label = nTotOccur

    def export (self):
        if not self.dWord: