Overview
Comment: | [build][fr] fix dictionary build if corpus data is empty |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | trunk | fr | build |
Files: | files | file ages | folders |
SHA3-256: |
fd0b49ddad0bc90acd7bca5dfb3fbd34 |
User & Date: | olr on 2025-06-23 09:09:56 |
Other Links: | manifest | tags |
Context
2025-06-23
| ||
09:09 | [build][fr] fix dictionary build if corpus data is empty Leaf check-in: fd0b49ddad user: olr tags: trunk, fr, build | |
2024-06-16
| ||
06:29 | [server] update bottle.py from 0.13-dev to 0.12.25 check-in: ae748416ff user: olr tags: trunk, server | |
Changes
Modified gc_lang/fr/dictionnaire/genfrdic.py from [417d2bdb9e] to [2c15ac24c5].
︙ | |||
442 443 444 445 446 447 448 | 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 | + - - - + + + | d = {} for oFlex in self.lFlexions: for c in oFlex.sFlexion: d[c] = d.get(c, 0) + oFlex.nOccur nTot = 0 for k in d: nTot += d[k] if nTot: |
︙ | |||
1034 1035 1036 1037 1038 1039 1040 | 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 | - + | for oFlexM in oEntry.lFlexions: if oFlex.sFlexion == oFlexM.sFlexion: nNewOccur = math.ceil((nFlexOccur * (oEntry.nAKO / nTotAKO)) / oFlexM.nDup) if nTotAKO else 0 hDst.write(sBlank + "{2:<30} {0.sMorph:<30} {0.nOccur:>10} %> {1:>10}\n".format(oFlexM, nNewOccur, oEntry.getShortDescr())) oFlexM.setOccurAndBlock(nNewOccur) def calcFreq (self, nTot): |
︙ | |||
1068 1069 1070 1071 1072 1073 1074 | 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 | - + | self.nOccur = n self.bBlocked = True def calcOccur (self): self.nOccur = math.ceil((self.nOccur / (self.nMulti+1)) / self.nDup) def calcFreq (self, nTot): |
︙ |