#7 Documentation bugs

closed
None
5
2007-06-21
2005-11-30
Frederik Fouvry
No

It is unclear from the documentation
- whether an entry in the dictionary can have a slash
in it. A precise syntax description would certainly be
helpful.
- whether the word count at the beginning of the file
is compulsory. What happens if the value is incorrect?
- whether comments are possible in the dictionary

Thanks!

Discussion

    • assigned_to: nobody --> nemethl
     
  • Logged In: YES
    user_id=726595

    Extended documentation in man/hunspell.4:

    ``A dictionary file (*.dic) contains a list of words, one
    per line.
    The first line of the dictionaries (except personal
    dictionaries)
    contains the approximate word count (for optimal
    hash memory size). Each word may optionally be followed
    by a slash ("/") and one or more flags, which represents
    affixes or special attributes. Dictionary words can contain also
    slashes with the "\/" syntax. (Hunspell 1.1.3 feature.)''

    I will make a precise syntax description, too.

    You can add a comment in the first line (thanks to
    the atoi() function), for example:

    100000 # (c) X. Y.

    Thanks for the bug report!

    Laci

     
  • Davide Prina
    Davide Prina
    2006-02-12

    Logged In: YES
    user_id=1060351

    > You can add a comment in the first line (thanks to
    > the atoi() function), for example:
    >
    > 100000 # (c) X. Y.

    but you can create comment also in this way

    a .dic file
    ---8<------8<-----8<-----8<-----8<--
    5
    / CopyRight (C) 2006 by me ;-)
    /
    / This is free software :-)
    word/ABC
    anotherword/A
    ---8<------8<-----8<-----8<-----8<--

    I have used this trick in the Italian dictionary.
    If I don't mistake (I have tested it some time ago, but now
    I don't remember) the only thing that can happen is that if
    in the .aff file there is a flag like this:

    SFX C Y 1
    SFX C 0 ri .

    the word "ri" is generated by comments.

    It will be wonderful if all lines starting with / are comments.

    Ciao
    Davide

     
    • status: open --> closed