uga-rosa / cmp-dictionary

A dictionary completion source for nvim-cmp
MIT License
237 stars 17 forks source link

How to generate these two files in `/usr/share/dict/` ? #19

Closed AGou-ops closed 2 years ago

AGou-ops commented 2 years ago

image

I have installed aspell and compile a dict from aspell.net.

aspell dicts | grep en ```bash > aspell dicts | grep en ca-general ca-valencia en en-variant_0 en-variant_1 en-variant_2 en-w_accents en-wo_accents en_AU en_AU-variant_0 en_AU-variant_1 en_AU-w_accents en_AU-wo_accents en_CA en_CA-variant_0 en_CA-variant_1 en_CA-w_accents en_CA-wo_accents en_GB en_GB-ise en_GB-ise-w_accents en_GB-ise-wo_accents en_GB-ize en_GB-ize-w_accents en_GB-ize-wo_accents en_GB-variant_0 en_GB-variant_1 en_GB-w_accents en_GB-wo_accents en_US en_US-variant_0 en_US-variant_1 en_US-w_accents en_US-wo_accents fa-generic fa-scientific ```

my dict directory:

> ls /usr/share/dict
      README       connectives       propernames       web2       web2a       words
anotherchu commented 2 years ago

Also having this problem. Compiling from aspell.net does not in fact create any file in /usr/share/dict/. Also, in the aspell.net packages, there does not seem to be any file in the "words" format.

On Arch, I installed the words package, but it is limited on the available languages.

How is it possible to create a words file, such that it works with this plugin, from the aspell.net dict packages?

andriati-alex commented 2 years ago

After installing aspell the following worked for me to generate dictionaries as plain text files:

aspell -d en_US dump master | aspell -l en expand > american_english.dic

you can generate other dictionaries as well. Then you can move and name them wherever you want.

AGou-ops commented 2 years ago

@andriati-alex I see, thank you.