spell_checker
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
spell_checker [2016/07/14 03:19] – g00r00 | spell_checker [2020/09/28 22:18] (current) – g00r00 | ||
---|---|---|---|
Line 17: | Line 17: | ||
==== HunSpell Prerequisite ==== | ==== HunSpell Prerequisite ==== | ||
- | Mystic uses the Hunspell engine to assist in the capabilities described above. | + | Mystic uses the Hunspell engine to assist in the capabilities described above. |
If English is your native language, then you will easily find dictionaries for US, Canadian, UK, and Australian dialects of English. | If English is your native language, then you will easily find dictionaries for US, Canadian, UK, and Australian dialects of English. | ||
Line 23: | Line 23: | ||
==== Installing HunSpell ==== | ==== Installing HunSpell ==== | ||
- | In order for spell checking to enable, Hunspell must be installed and at least one dictionary must exist in Mystic' | + | In order for spell checking to enable, Hunspell must be installed and at least one dictionary must exist in Mystic' |
+ | Windows: | ||
+ | |||
+ | Copy appropriate .DLL into root Mystic directory or system lib path. Note | ||
+ | that the 32-bit version of Mystic requires the 32-bit version of Hunspell, | ||
+ | and the 64-bit version of Mystic requires the 64-bit version of Hunspell. | ||
+ | |||
+ | For the 32-bit version, Mystic will be looking for libhunspell32.dll and | ||
+ | for the 64-bit version, Mystic will be looking for the libhunspell64.dll. | ||
+ | |||
+ | Copy the appropriate .dll into the root Mystic directory or somewhere else | ||
+ | in your Windows system that is configured in a way that will allow Mystic to | ||
+ | find it on startup. | ||
+ | |||
+ | Linux: | ||
+ | |||
+ | In Linux, Mystic looks for the existence of " | ||
+ | common library path. For Ubuntu, this could already be installed by default | ||
+ | and Mystic may work out of the box without any installation other than | ||
+ | dictionary files. | ||
+ | |||
+ | If this is not true with the distribution you are using then you may need to | ||
+ | install it using a package manager. | ||
+ | |||
+ | Raspbian Jessie/ | ||
+ | |||
+ | sudo apt-get update | ||
+ | sudo apt-get install libhunspell-dev | ||
+ | |||
+ | If the package installed does not already create a symbolic link so that | ||
+ | libhunspell.so exists, then you must create a symbolic link. First, find | ||
+ | where the file exists: | ||
+ | |||
+ | sudo find /usr -name libhunspell* | ||
+ | |||
+ | If you do not see a " | ||
+ | in that name and point it to where the Hunspell library is. So if the find | ||
+ | above returns "/ | ||
+ | link of that file which points to libhunspell.so: | ||
+ | |||
+ | sudo ln -s / | ||
+ | |||
+ | After that you're all set with the Hunspell installation | ||
+ | |||
+ | Mac OSX: | ||
+ | |||
+ | macOS uses libhunspell itself, so every version of macOS comes with hunspell | ||
+ | already installed. | ||
+ | while the current versions are in the 1.4.X iterations. | ||
+ | |||
+ | The 1.2.0 version to my knowledge does not support multiple dictionaries | ||
+ | so one may wish to install a later version. | ||
+ | the later versions, " | ||
+ | |||
+ | First update Homebrew to the latest: | ||
+ | |||
+ | brew update | ||
+ | |||
+ | Next install hunspell: | ||
+ | |||
+ | brew install hunspell | ||
+ | |||
+ | To verify it installed type " | ||
+ | should see it print out a version which is currently 1.4.1. | ||
+ | |||
+ | Regardless of if you've just installed Hunspell or you want to use the default | ||
+ | macOS version, you'll need to locate where the Hunspell library is installed: | ||
+ | |||
+ | sudo find /usr -name libhunspell*.dylib | ||
+ | |||
+ | Mystic looks for " | ||
+ | symbolic link to whatever version of Hunspell is installed or they wish to | ||
+ | use. Lets say the search above gives us a location of: | ||
+ | |||
+ | "/ | ||
+ | |||
+ | In order for Mystic to find it, we need to create a symbolic link from the | ||
+ | actual file to the name that Mystic is looking for: | ||
+ | |||
+ | sudo ln -s / | ||
+ | |||
+ | Once that is done, Hunspell is ready to be used. | ||
+ | |||
+ | |||
+ | ==== Enabling Spell Checking ==== | ||
+ | |||
+ | After HunSpell is installed, other steps must be followed on the Mystic side to enable spell checking: | ||
+ | |||
+ | Mystic' | ||
+ | |||
+ | These files determine the " | ||
+ | |||
+ | At a minimum, those files need to exist for the spell checker to operate. | ||
+ | and .aff file into your DATA directory. | ||
+ | |||
+ | If you want to locate additional dictionaries, | ||
+ | |||
+ | http:// | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Remember, you only need a .dic and a .aff for the language and dialect you want to use, and only the .dic file for any secondary languages you may wish to use. | ||
+ | |||
+ | Once you have the .dic and .aff file of the primary language you want, then copy them into the DATA directory as " | ||
+ | |||
+ | There are some additional optional things to know about as well. You probably want to copy the wordlist.txt included in the package into your DATA directory: | ||
+ | |||
+ | === WORDLIST.TXT === | ||
+ | |||
+ | This file can exist in the DATA directory and it can contain words that will be added into the dictionary regardless of what dictionaries are being used. | ||
+ | |||
+ | This file is helpful to prevent common BBS related acronyms and the sort of words that would not normally be found in an official dictionary, and the package includes a WORDLIST.TXT already for you with some common terms. | ||
+ | |||
+ | Blank lines are skipped and any line that begins with a semi-colon (;) will also be ignored, so that comments can be made in the file if desired. | ||
+ | |||
+ | === DICTLIST.TXT === | ||
+ | |||
+ | This optional file contains a list of secondary .dic files that will be loaded after the primary language. | ||
+ | |||
+ | In this file, blank lines are ignored as well as any line which begins with a semi-colon (;). If just a filename (ie french.dic) is referenced, Mystic will look in the DATA directory for the file, but a full directory name can be included here as well. The " | ||
+ | |||
+ | french.dic | ||
+ | @ROOT@data\french.dic | ||
+ | c: | ||
+ | |||
+ | In the above examples, all three of those lines will point to the same location in the DATA directory. | ||
+ | |||
+ | NOTE: Some versions of Hunspell do not allow multiple dictionaries to be used and when Mystic encounters this situation, only the primary dictionary will be loaded. | ||
+ | |||
+ | ==== Message Editor Template Options ==== | ||
+ | |||
+ | By default, nothing needs to be done with the default message editor template (msg_editor.ini), | ||
+ | |||
+ | === Suggestion Delay === | ||
+ | |||
+ | By default this is set to true, which causes Mystic to wait until the user does not type for around a half of a second before it will try to auto suggest words. | ||
+ | |||
+ | ==== TROUBLESHOOTING ==== | ||
+ | |||
+ | If the spell checker does not show as enabled while editing a message, then read the node's log file for any Hunspell related error messages, and also validate that the dictionary.aff and dictionary.dic files exist in the data folder. | ||
+ | |||
+ | Make sure you are using the proper " | ||
spell_checker.1468484358.txt.gz · Last modified: 2016/07/14 03:19 by g00r00