You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
first of all: thanks for this project. I just try it for dictionary I maintained and it fails with : ValueError: invalid literal for int() with base 10: 'šími/Fs'
Which is great because .aff file has error, but this message does not said for ordinary user...
Is there any function to check correctness of .dic and .aff files?
Or at least please provide better error message with something like this:
@@ -246,10 +246,15 @@ def read_value(source: BaseReader, directive: str, *values, context: Context) ->
]
if directive in ['SFX', 'PFX']:
flag, crossproduct, count, *_ = values
- return [- make_affix(directive, flag, crossproduct, *line, context=context)- for line in _read_array(int(count))- ]+ try:+ return [+ make_affix(directive, flag, crossproduct, *line, context=context)+ for line in _read_array(int(count))+ ]+ except ValueError as error:+ print(f"Error at: directive, values: {directive}, {values}")+ print(f"Maybe wrong count of rules?")+ raise error
Most of the spellcheckers create function for end users but forgot about dictionary creators and maintainers ;-) (Aspell at least tried to report e.g. affix problems when creating dictionary from wordlist...)
The text was updated successfully, but these errors were encountered:
To be completely honest, when I started the project, that was one of the (distant) goals: tol also do a tool for dictionary investigation/debugging/validation (as Spylls attempts to make things more "understable and hackable"). But to put a basis in place, document it, and describe it all in a series of articles took 1,5 years of my OSS time, so currently my attention is mostly on other projects.
That being said, I'll gladly accept a PR which makes dictionary authors' life better :)
zdenop
added a commit
to zdenop/spylls
that referenced
this issue
Oct 22, 2021
Hello,
first of all: thanks for this project. I just try it for dictionary I maintained and it fails with :
ValueError: invalid literal for int() with base 10: 'šími/Fs'
Which is great because
.aff
file has error, but this message does not said for ordinary user...Is there any function to check correctness of
.dic
and.aff
files?Or at least please provide better error message with something like this:
Most of the spellcheckers create function for end users but forgot about dictionary creators and maintainers ;-) (Aspell at least tried to report e.g. affix problems when creating dictionary from wordlist...)
The text was updated successfully, but these errors were encountered: