Overview
| Comment: | [fr][build] contrôle amélioré des entrées du dictionnaire Hunspell |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | trunk | fr | build |
| Files: | files | file ages | folders |
| SHA3-256: |
4f84e0d1c1a9f71ae9411cd8822c400b |
| User & Date: | olr on 2025-12-12 14:53:52 |
| Other Links: | manifest | tags |
Context
|
2025-12-12
| ||
| 14:53 | [fr][build] contrôle amélioré des entrées du dictionnaire Hunspell Leaf check-in: 4f84e0d1c1 user: olr tags: trunk, fr, build | |
|
2025-12-06
| ||
| 21:37 | [fr] fichier des affixes: commentaires check-in: 24336b82aa user: olr tags: trunk, fr | |
Changes
Modified gc_lang/fr/dictionnaire/genfrdic.py from [fce132f18a] to [3f7c9cfb70].
| ︙ | ︙ | |||
662 663 664 665 666 667 668 |
self.ph = ''
# champs annexes
self.lx = ''
self.se = ''
self.et = ''
self.di = '*'
self.fq = ''
| | | 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 |
self.ph = ''
# champs annexes
self.lx = ''
self.se = ''
self.et = ''
self.di = '*'
self.fq = ''
self.iD = '0' # hunspell attribute: id. Since the DB has been lost, useless.
# autres
self.comment = ''
self.err = ''
self.nFlexions = 0
self.lFlexions = []
self.sStem = ''
|
| ︙ | ︙ | |||
721 722 723 724 725 726 727 728 |
echo(" @ : " + self.lemma)
def __str__ (self):
return "{0.lemma}/{0.flags} {1}".format(self, self.getMorph(2))
def check (self):
sErr = ''
if self.lemma == '':
| > | | | > | > > > > > > > > > > > > | | | | | | | > > | < < | | < | | 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 |
echo(" @ : " + self.lemma)
def __str__ (self):
return "{0.lemma}/{0.flags} {1}".format(self, self.getMorph(2))
def check (self):
sErr = ''
# lemme
if self.lemma == '':
sErr += ' > lemme vide'
if re.match(r"^\s", self.lemma):
sErr += ' > espace en début de lemme <' + self.lemma + '>'
if re.search(r"\s$", self.lemma):
sErr += ' > espace en fin de lemme <' + self.lemma + '>'
# verbe
if re.match(r"v[0123]", self.po) and not re.match(r"[eas_][ix_][tx_][nx_][pqreuvx_][mx_][ex_z][ax_z]\b", self.po[2:]):
sErr += ' > verbe mal étiqueté: ' + self.po
if re.match(r"[abcdf]0", self.flags):
if not re.search(r"p[+.]", self.flags):
sErr += ' > verbe sans participe passé: ' + self.po
if "()" not in self.flags:
sErr += ' > drapeau () manquant'
if re.match(r"v...t", self.po) and "p+" not in self.flags:
sErr += ' > drapeau p+ absent sur un verbe étiqueté transitif'
if self.flags.startswith(("a0", "b0", "c0", "d0")) and not self.lemma.endswith("er"):
sErr += " > drapeau pour verbe du 1ᵉʳ groupe sur un lemme qui ne finit pas par -er"
if self.flags.startswith("f") and not self.lemma.endswith(("ir", "ïr")):
sErr += " > drapeau pour verbe du 2ᵉ groupe sur un lemme qui ne finit pas par -ir"
# nom / adj
if (re.match(r"S[.+]", self.flags) and re.search("[sxz]$", self.lemma)) or (re.match(r"X[.]", self.flags) and not re.search("[ul]$", self.lemma)):
sErr += ' > drapeau inutile'
if self.iz == '' and re.match(r"[SXAI](?!=)", self.flags) and self.po:
sErr += ' > étiquette <is> vide'
if re.match(r"pl|sg|inv", self.iz):
sErr += ' > étiquettes <is> incomplètes, genre non spécifié (mas/fem/epi)'
if re.match(r"[FW]", self.flags) and re.search(r"epi|mas|fem|inv|sg|pl", self.iz):
sErr += ' > étiquettes <is> incohérentes'
if re.search(r"pl|sg|inv", self.iz) and re.match(r"[SXAIFGW](?!=)", self.flags):
sErr += ' > étiquettes <is> incohérentes '
if re.search(r"pl|sg|inv", self.iz) and re.match(r"[SXAIFGW](?!=)", self.flags):
sErr += ' > étiquettes <is> incohérentes '
if self.iz.endswith(("mas", "fem", "epi")) and (not self.flags or not self.flags.startswith(("S", "X", "F", "W", "A", "I", "U"))):
sErr += ' > étiquettes <is> incomplètes'
if re.match(r"[SXAIFGW](?!=)", self.flags) and "()" not in self.flags:
sErr += ' > drapeau () manquant'
if sErr:
echo(f" erreur {sErr} sur " + self.__str__())
def setTagsFrom (self, oEnt):
self.po = oEnt.po
self.iz = oEnt.iz
self.ds = oEnt.ds
self.ts = oEnt.ts
self.ip = oEnt.ip
|
| ︙ | ︙ |