Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

1. Overview

The User Dictionary is a special functionality that is aimed at the end users of web-based system where the WebSpellChecker products are integrated. It allows each end user to create personal dictionaries with custom words (complex words, acronyms, proper names, etc.) and use them while working with the system. Going further, all the words added to a personal dictionary will not be considered as misspellings, and they will also be available in the suggestions list. 

By default, all words added to the personal dictionary are stored in the browser local storage on the user side. As soon as the user creates a new dictionary, all new words and the words from the browser local storage will be added to this dictionary and stored on the system server. It allows the user access this personal dictionary from different browsers and machines (or devices) while working with the system. Thus, users are not limited by one particular browser on their side as in case with the words stored in the browser local storage.


Panel

Table of Contents
maxLevel2
stylenone

2. User

Dictionary User Interface

dictionaries UI overview

2.1.

User Dictionary Interface in WProofreader Product

 Personal user dictionaries in WProofreader

To access personal user dictionaries in WProofreader: 

  1. Locate the badge in the lower-right corner of your web application with integrated WProofreader and hover your mouse over it.

  2. In the menu which appears, click a button with gears. 

  3. In the WProofreader dialog which opens, navigate to the WProofreader Settings > Dictionaries options group. 

Image Added


The personal user dictionary can be managed via simple user interface of the Settings dialog on the Dictionary tab. It allows users to create personal dictionaries with custom words (complex words, acronyms, proper names, etc.) and use them while working with the system. All the words added to a personal dictionary will not be considered as misspellings and these words will also be available in the suggestions list. The user has the ability to can look through the full list of the words that have been added to this dictionary and also manage the words from a simple user interfacelist. The words can be added either from the using a context menuAdd word command or directly on the Dictionary tab.

Dictionary preferences

2.2. Personal user dictionary in SCAYT plugin for CKEditor 4

To add the words By default all the words added to the personal user dictionary are stored in the browser local storage on the user side. As soon as the user creates a new dictionary, all new words and the words from the browser local storage will added to this dictionary and stored on the system server. It allows the user to use this personal dictionary from the different browsers and machines (or devices) while working with the system. Thus, users are not limited by one particular browser on their side as in case with the words stored in the browser local storage.

3. Predefine User Dictionary in Web Application

in SCAYT plugin for CKEditor 4:

  1. On CKEditor toolbar locate and click the ABC icon. In the dropdown menu, select Dictionaries.
  2. The SCAYT dialog opens with the Dictionary tab selected. 
  3. Click the Dictionary Preferences button.
  4. Type the new dictionary name and click either Create button to create a brand new dictionary or click Connect to connect with already existing server user dictionary.
  5. Click OK to save your changes.

SCAYT Plugin for CKEditor 4 Dictionaries tabImage Added

Now all new words are added to the browser local storage. If there are any words which have already been added while working with it, these words are added to a newly created dictionary. Note that this dictionary is available for a particular user who has created it and knows the name of dictionary.

Tip

For details, refer to User Dictionary FAQ section.

3. Predefined user dictionary

You have an option to set a predefined User Dictionary on your web-page for a particular editable elementuser dictionary for your end users. With such an approach all the words added using Add word by your end users will be saved and stored in the dictionary that you predefined. Just specify a necessary add the User Dictionary parameter and set specify your predefined dictionary name as a value.

Below you can find a table with the names of User Dictionary parameter by product type:

Product Integration

User Dictionary Parameter

SCAYT plugin for CKEditor 4

scayt_userDictionaryName

WSC plugin for CKEditor 4

wsc_userDictionaryName

SCAYT plugin for Froala EditoruserDictionaryName

WProofreader

userDictionaryName

3.1. Example of setting up a predefined personal user dictionary in WProofreader

For example, to predefine  a personal user dictionary in WProofreader, follow the procedure described below:

     1. Initialize WProofreader using the procedure described in Get started with WProofreader Server (autoSearch) guide.

     2. Add the userDictionaryNameoption with a name of dictionary as shown below.
Code Block
languagexml
themeEmacs
<script> 
	window.WEBSPELLCHECKER_CONFIG = {
		... 
		userDictionaryName: 'predefineduser_dictionary',
		...
	}; 
</script>

     3. To disable the dictionary preferences UI for your users, specify the disableDictionariesPreferences option as true as shown below.

Code Block
languagexml
themeEmacs
<script>
	window.WEBSPELLCHECKER_CONFIG = {
		....
		userDictionaryName: 'predefined_user_dictionary',
		disableDictionariesPreferences: true, 
		...
	};
</script>

After performing this step, the highlighted area of the Dictionaries options group becomes disabled for WProofreader users. 

Image Added

3.2. Example of setting up a predefined user dictionary in SCAYT plugin for CKEditor 4

To set up a predefined user dictionary in SCAYT plugin for CKEditor 4:  

  1. Initialize SCAYT plugin for CKEditor. For details, refer to Configuring SCAYT Plugin for CKEditor 4 guide.
  2. Along with the rest of parameters for SCAYT plugin in CKEditor config.js file, add scayt_userDictionaryName parameter to it as shown in the example below:
Code Block
languagejs
themeEmacs
titleCKEditor config.js file
...
config.scayt_autoStartup = true;
config.grayt_autoStartup = true;
config.scayt_sLang ="en_US";
config.scayt_userDictionaryName="user_dictionary_name";
...
4. Administrate User Dictionary

A predefined user dictionary is now available in WProofreader and SCAYT plugin for CKEditor 4.

Tip

For details, refer to User Dictionary FAQ section.

4. Manage user dictionary on Server

The WebSpellChecker Server version of the WebSpellChecker application provides a list of options for advanced User Dictionaries administrationmanagement.  

4.1. Location of

User Dictionaries

user dictionaries on

Server

server

By default, all All the created personal user dictionaries are saved and stored on the server where the WebSpellChecker application is installed and running in the UserDictionaries folder: <WebSpellChecker_Installation_Path>/AppServer/UserDictionaries. These dictionaries are saved as simple text files in *.txt format with UTF-8 encoding.  Excerpt IncludeIN:_include_wsc500_user_dictionary_folderIN:_include_wsc500_user_dictionary_foldernopaneltrue

4.2. User

Dictionaries

dictionaries Web API

Commands 

commands 

There is a list of the Web API commands available that allows administrators of the application to operate manage the User Dictionary functionality. The full list of Web API commands for User Dictionary can be found in the Using WebSpellChecker Server Web API#4.UserDictionaryCommand manual.

5.

Setup User Dictionary on Remote Server 

Set up user dictionary on a remote server 

There is a special mechanism available for the User Dictionary functionality which allows working with personal user dictionaries on the environment running under a load balancerLoad Balancer. It is aimed at synchronizing the work of the User Dictionary functionality among a number of the WebSpellChecker application servers Servers running at the same time.  

In a nutshell, with such an approach, one of the WebSpellChecker application servers Servers should be defined as a User Dictionary Server. All personal user dictionaries created by end users will be stored only on this particular server. The rest WebSpellChecker application servers Servers will be considered as User Dictionary Clients which will access a defined User Dictionary Server in case of any operations with User Dictionary functionality. 

Image Added

This approach can be easily configured in your environment. Just follow the step-by-step instructions below.

Step

5.1.  Define and

Configure User Dictionary Server

configure user dictionary server

On this step you need to appoint assign a User Dictionary Server role to one of the WebSpellChecker application serversServers. The rest application servers will be User Dictionary Clients that will be connected with the appointed assigned User Dictionary Server. Here are the steps that needs need to be performed to configure a User Dictionary Server.

Stage 1: Editing AppServerX.xml file

Edit in AppServerX.xml file to specify a unique port number for User Dictionary Server. To do so:

  • Stop AppServer before editing the AppServerX.xml file. Refer to Main AppServer Commands guide, Stop AppServer section for details.
  • Open Open <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xmlof the WebSpellChecker application server Server that will be used as a User Dictionary Server address.
  • Locate the <Port> tag and change the default port value to any available (e.g.  28812882) as shown below.
Code Block
languagexml
themeEmacs
<Port>2881<<Port>2882</Port>

Stage 2: Editing the ssrv.ini file

Note

This step is required when you have selected WebSpellChecker Dialog for CKEditor 4 product (which is enabled via the FastCGI module) during the setup process.

To edit the ssrv.ini file:

  • 1. Open Open the <WebSpellChecker_Installation_Path>/WebComponents/WebInterface/script/ssrv.ini file.
  • 2. Locate appserver_port parameter and change the default port value to 2881 2882 (the same as on the previous step). 
Code Block
languagexml
themeEmacs
appserver_port = 2881
  • As soon as the modifications are completed, you are required to restart the WebSpellChecker application server (AppServer) for the changes to take effect.
Expand
titleClick here to see how to restart AppServer on Windows-based environments...
2882

3. Restart your web or Java application server after the changes made to the ssrv.ini file.

5.2. Configure user dictionary clients

Excerpt IncludeIN:_include_stop_appserver_windowsIN:_include_stop_appserver_windowsnopaneltrue Excerpt IncludeIN:_include_start_appserver_windowsIN:_include_start_appserver_windowsnopaneltrue Expand
titleClick here to see how to restart AppServer on Linux-based environments...
Excerpt IncludeIN:_include_stop_appserver_linuxIN:_include_stop_appserver_linuxnopaneltrue Excerpt IncludeIN:_include_start_appserver_linuxIN:_include_start_appserver_linuxnopaneltrue
  • Also, due to changes in the ssrv.ini file, it is also recommended to restart your Web/Application Server.
Step 2. Configure User Dictionary Clients

As soon as the User Dictionary Server is defined, the next step is configure the rest application servers other WebSpellChecker Servers that will be considered as User Dictionary Clients.

  • Stop AppServer before editing the AppServerX.xml file. Refer to Main AppServer Commands guide, Stop AppServer section for details.
  • Open <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml of each application server each WebSpellChecker Server that should work as a User Dictionary Client.
  • Locate the <UserDictServers> tag.
  • In the tag, set the <EnableUserDictServer> tag value as true and specify the default <UserDictHost> <UserDictServerAddress> tag providing an IP a host address and port number of a designated User Dictionary Server.
Code Block
languagexml
themeEmacs
<UserDictServers>
	<EnableUserDictServer>true</EnableUserDictServer>
    <UserDictHost>127<UserDictServerAddress>127.0.0.1:2880<2882</UserDictHost>UserDictServerAddress>
</UserDictServers>
Excerpt IncludeIN:_include_stop_appserver_windowsIN:_include_stop_appserver_windowsnopaneltrue Excerpt IncludeIN:_include_start_appserver_windowsIN:_include_start_appserver_windowsnopaneltrue Expand
titleClick here to see how to restart AppServer on Linux-based environments...
Excerpt IncludeIN:_include_stop_appserver_linuxIN:_include_stop_appserver_linuxnopaneltrue Excerpt IncludeIN:_include_start_appserver_linuxIN:_include_start_appserver_linuxnopaneltrue
  • As soon as the modifications are completed, restart the WebSpellChecker application server Application Server (AppServer) for the changes to take effect.
Expand
titleClick here to see how to restart AppServer on Windows-based environments...
Note

Actions described in Step 2 must be performed for each copy of the WebSpellChecker application server Server which is working as a User Dictionary Client.

Step

5.3. Verify

Work of Remote User Dictionary

the work of remote user dictionary

Follow the steps below to verify the work of the remote User Dictionary Server.

  • Go to WebSpellChecker Samples shipped with the installation package:

     

    Info

    http(s)://your_host_name

    :port_number

    /wscservice/samples/

  • Open any demo sample, e.g. SCAYT for Content Editable tagsWProofreader for Rich Text Editors, for example, CKEditor 4 with WProofreader enable.
  • Create a sample user dictionary . Open the SCAYT context menu and go to Settings –> Dictionaries tab –> Dictionary Preferences –> Create a new user dictionary named “Test”.and add some words to this dictionary. To do so:  
    • Locate the badge in the lower-right corner of your web application with integrated WProofreader and hover your mouse over it.
    • In the menu which appears, click an icon with gears.
    • In the WProofreader dialog which opens, navigate to the Dictionaries options area, type a new dictionary name, for example, "Test" and click Create.
    • In the Add new word area, type some words to be added to this newly created personal user dictionary and either press Enter or click the Add word button.
  • Navigate  Go to User Dictionaries folder (UserDictionaries) of each copy of the WebSpellChecker application server Server that is configured as a User Dictionary Client. This folder shouldn't Make sure that these folders don’t contain a newly created user dictionary named “Test”.  Excerpt IncludeIN:_include_wsc500_user_dictionary_folderIN:_include_wsc500_user_dictionary_foldernopaneltrue
  • Go to User Dictionary folder (UserDictionaries) of the WebSpellChecker application server which is set as User Dictionary Server. This UserDictionaries folder must contain the newly created dictionary named “Test”. Moreover, you may add several words to this user dictionary via user interface and after that verify that those words are recorded in the saved user dictionary “Test”
  • "Test". Your dictionary and any words that you have added to it must be located in a folder with the same name on a User Dictionary Server only.