Differences From Artifact [8ffd099fca]:
- File grammalecte-cli.py — part of check-in [473adba16f] at 2025-09-23 10:17:47 on branch trunk — [cli] additionnal info in debug mode (user: olr, size: 19303) [annotate] [blame] [check-ins using]
To Artifact [807abadcc4]:
- File grammalecte-cli.py — part of check-in [4858dc598e] at 2025-09-23 11:14:16 on branch trunk — [cli] clarity for spelling suggestion (user: olr, size: 19372) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 |
echo(" - " + sElem)
for sMorph, sMeaning in aRes:
echo(" {:<40} {}".format(sMorph, sMeaning))
elif sText.startswith("!"):
# spelling suggestions
for sWord in sText[1:].strip().split():
if sWord:
for lSugg in oSpellChecker.suggest(sWord):
echo(" | ".join(lSugg))
if xArgs.debug:
for sSugg in lSugg:
nDist = strt.distanceDamerauLevenshteinX(sWord, sSugg)
echo(f"{sSugg:30} {nDist}")
elif sText.startswith(">"):
# path in the word graph
oSpellChecker.drawPath(sText[1:].strip())
elif sText.startswith("="):
# search in dictionnary
sSearch = sText[1:].strip()
if "=" in sSearch:
| > > | 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 |
echo(" - " + sElem)
for sMorph, sMeaning in aRes:
echo(" {:<40} {}".format(sMorph, sMeaning))
elif sText.startswith("!"):
# spelling suggestions
for sWord in sText[1:].strip().split():
if sWord:
print(sWord)
for lSugg in oSpellChecker.suggest(sWord):
echo(" | ".join(lSugg))
if xArgs.debug:
for sSugg in lSugg:
nDist = strt.distanceDamerauLevenshteinX(sWord, sSugg)
echo(f"{sSugg:30} {nDist}")
print()
elif sText.startswith(">"):
# path in the word graph
oSpellChecker.drawPath(sText[1:].strip())
elif sText.startswith("="):
# search in dictionnary
sSearch = sText[1:].strip()
if "=" in sSearch:
|
| ︙ | ︙ |