You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

This guide outlines the main steps on how to exclude certain words from the dictionary by creating a special exclude dictionary. Such dictionary is similar to the global custom dictionaries. You can find it useful when excluding certain words from any supported language dictionaries. For more details, refer to this article. 

Prerequisites

You can start adding and configuring excluded words after you have installed the server version of WebSpellChecker application to the server.  It is not enabled in the [WebSpellChecker installation folder]/AppServer/AppServerX.xml file by default. You can enable it using the procedure described below where we excluded certain words for the English language dictionary.  

To exclude certain words from the English dictionary:

  1. Navigate to the [WebSpellChecker_installation_folder]/AppServer directory. 
  2. Create a .tlx file and add the words intended for excluding to it. To do so, in the "[WebSpellChecker_installation_folder]/AppServer/LanguageDictionaries" folder, create "en_exclude.tlx" file and add the word 'mango' to it.
    The required file format for excluding wordlists is a text file saved with *.tlx extension. 

    The required file format for excluding wordlists is a text file saved with *.tlx extension. A wordlist must be in UTF-8 format where each  word is located in a new line.

  3. Stop AppServer before editing the AppServerX.xml file.


    Stop AppServer on a Windows server

    There are three possible options how you can stop AppServer on Windows-based environments.

    Option A: Go to Windows Start –> All Programs –> WebSpellChecker –> AppServer –> Stop WebSpellChecker Application Server

    Option B: Open Command Prompt –> Switch to [WebSpellChecker_Installation_Path]/AppServer –> Run AppServerX -stop

    Option C:

    • Go to Windows Start –> Control Panel –> Administrative Tools –> Services
    • Find WebSpellChecker Application Server Service on the list of all services
    • Click Stop


    Stop AppServer on a Linux server

    Run the stop.sh script to stop AppServer using the following command below:

    sudo sh <WebSpellChecker_Installation_Path>/WSC/AppServer/stop.sh

    Or your can also run the stop.sh script from the AppServer directory:

    /<WebSpellChecker_Installation_Dir>/WSC/AppServer/# sh stop.sh
    

  4. In the [WebSpellChecker_installation_folder]/AppServer directory, navigate to the AppServerX.xml file.

  5. Find the language tag with setting with for a required language, in our case, this is American English. In this tag, add a new tag with the path to a newly created file (see step 2) containing the list of words for excluding in these tags: 

    <!-- Add words to exclude from the main dictionary.-->
    <Dictionary FullPath="LanguageDictionaries/en_exclude.tlx">
  6. Activate the exclude functionality specifying the <ForExclude>true</ForExclude> tag.

     <Language Id="en_US">
    	<Alias>en</Alias>
    	<Alias>am</Alias>
    	<GrammarCheckProviderOptions>en-US</GrammarCheckProviderOptions>
    	<ThesaurusEnabled>true</ThesaurusEnabled>
    	<SpellEngineOptions>
    		<Locale>am</Locale>
    		<SpellCheckProvider>ssce</SpellCheckProvider>
    			<Dictionary FullPath="ssceam2.clx">
    				<ForSuggest>no</ForSuggest>
    			</Dictionary>
    			<Dictionary FullPath="ssceam2s.clx">
    				<ForSuggest>yes</ForSuggest>
    			</Dictionary>
    			<Dictionary FullPath="LanguageDictionaries/en_exclude.tlx"> 	
    				<ForExclude>true</ForExclude>
    			</Dictionary>
    			<Dictionary FullPath="keywords.clx"/>
    			<Dictionary FullPath="ssceam.tlx"/>
    		</SpellEngineOptions>
    </Language>
  7. Make sure that you have started the AppServer.


    Start AppServer on Windows

    There are three possible options how you can start AppServer on Windows-based environments.

    Option A: Go to Windows Start –> All Programs –> WebSpellChecker –> AppServer –> Start WebSpellChecker Application Server

    Option B: Open Command Prompt –> Switch to [WebSpellChecker_Installation_Path]/AppServer –> Run AppServerX -start

    Option C:

    • Go to Windows Start –> Control Panel –> Administrative Tools –> Services
    • Find WebSpellChecker Application Server Service on the list of all services
    • Click Start


    Start AppServer on Linux

    Run the start.sh script to start AppServer using the following command below:

    sudo sh <WebSpellChecker_Installation_Path>/WSC/AppServer/start.sh


    The word 'mango' should become an excluded one: it will be considered as a misspelling and red-marked accordingly.
  • No labels