• Forum
  • Lounge
  • Where to get dictionaries for spellcheck

 
Where to get dictionaries for spellcheck during coding?

I'm coding in VSCode and use the extension called cSpell which let's me set custom dictionaries to spell check code, comments and any text in source files.

Problem is that getting dictionaries is not easy, I have not found many great sources to download them.

In particular I'm looking for the following dictionaries:

Words related to:
networking
program names
protocol names
command names, ex. those in bash or cmd
programming languages keywords
computer terms
firewall terms

And so on.

Any idea where I could download these?
for standard words, you can try gaming, like scrabble/boggle/etc but those remove words that are not legal, too long, unpossible with the game tiles, etc.
you can get the whole english dictionary from miriam webster as a text file.

past that you are in for some legwork, eg you might use this:
https://docs.oracle.com/cd/E53394_01/pdf/E54755.pdf
and extract it as text and run a little parser program over it to reformat it into what you need. I don't think most of those will come in a 'dictionary' text file format, but you can build one easily from various online resources, faster than you can get a better answer from a bunch of people :) (there may be a better answer, but its only like 15 min to build one too).

cmd is very small and you could start with a redirect to text file of the help and parse out the words. There are probably some undocumented commands from dos days that are not in the help, but it would be a solid starting point.

notepad ++ has dictionaries for a LOT of languages. I think they are just text files and I think you can use those as well, eg for c++ keywords. For example, under langs.xml you can see this for c++ (partial, I cut it off)

<Language name="cpp" ext="cpp cxx cc h hh hpp hxx ino" commentLine="//" commentStart="/*" commentEnd="*/">
<Keywords name="instre1">alignof and and_eq bitand bitor break case catch compl const_cast continue default delete do dynamic_cast else false for goto if namespace new not not_eq nullptr operator or or_eq reinterpret_cast return sizeof static_assert static_cast switch this throw true try typedef typeid using while xor xor_eq NULL</Keywords>
<Keywords name="type1">alignas asm auto bool char char16_t char32_t class clock_t concept const consteval constexpr constinit decltype double enum explicit export extern final float friend inline int int8_t int16_t int32_t int64_t int_fast8_t int_fast16_t int_fast32_t int_fast64_t intmax_t intptr_t long mutable noexcept override private protected ptrdiff_t public register requires short signed size_t ssize_t static struct template thread_local time_t typename uint8_t uint16_t uint32_t uint64_t uint_fast8_t uint_fast16_t uint_fast32_t uint_fast64_t uintmax_t uintptr_t union unsigned virtual void volatile wchar_t</Keywords>

and there is one for about 50+ languages.
Last edited on
Thank you for suggestions, I had some feeling this won't be possible without any work.

Dictionaries need to be huge to be useful, the larger they are the better spellcheck is.
I've made my own repo dedicated to dictionaries, as I write code so I fill them into the cloned repo (semi-automatically with the help of cSpell extension)

At least it's some progress :)
Can you manually add to an existing dictionary so that when you see, for example, "grep" underlined in red, you can at least fix it for the next time? That's what I normally do.

I mean I get it -- that is very tedious if you do work with non-dictioary-word terms a lot.
Last edited on
Can you manually add to an existing dictionary so that when you see, for example, "grep" underlined in red, you can at least fix it for the next time? That's what I normally do.


Yes, I get on hover menu which let's me choose into which *.dic file to add the word, that's what I do now, sadly my personal dict's are very small so I was hoping to do this less.
IDK if SCOWL would be useful to you.
http://wordlist.aspell.net/
Thank you very much for sharing and I apologize for late response.
Yeah this is useful dict collection for English spelling, I'll make use of it! thank you!
Last edited on
You’re welcome.


:O)
Registered users can post here. Sign in or register to post.