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

Compare with Current View Page History

« Previous Version 3 Next »

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.


2. User Dictionary User Interface

2.1. User Dictionary Interface in WProofreader Product

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 look through the full list of the words that have been added to this dictionary and also manage the words from a simple user interface. The words can be added either from the context menu Add word or directly on the Dictionary tab.

Dictionary preferences

By default all the 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 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

You have an option to set a predefined User Dictionary on your web-page for a particular editable element. 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 User Dictionary parameter and set your predefined dictionary as a value.

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

4. Administrate User Dictionary on Server

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

4.1. Location of User Dictionaries on Server

All the created personal user dictionaries are saved and stored on the server where the WebSpellChecker application is installed and running. These dictionaries are saved as simple text files in *.txt format with UTF-8 encoding. 

The default path to the User Dictionary (UserDictionaries) folder: <WebSpellChecker_Installation_Path>/AppServer/UserDictionaries

4.2. User Dictionaries Web API Commands 

There is a list of the Web API commands available that allows administrators of the application to operate 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 

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 balancer. It is aimed at synchronizing the work of the User Dictionary functionality among a number of the WebSpellChecker application servers running at the same time. 

In a nutshell, with such an approach, one of the WebSpellChecker application 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 will be considered as User Dictionary Clients which will access a defined User Dictionary Server in case of any operations with User Dictionary functionality.

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

Step 1.  Define and Configure User Dictionary Server

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

  • Open <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml of the WebSpellChecker application 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. 2881).
<Port>2881</Port>
  • Open the <WebSpellChecker_Installation_Path>/WebComponents/WebInterface/script/ssrv.ini file.
  • Locate appserver_port parameter and change the default port value to 2881 (the same as on the previous step). 
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.


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


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


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


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

  • 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 that will be considered as User Dictionary Clients.

  • Open <WebSpellChecker_Installation_Path>/AppServer/AppServerX.xml of each application 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> tag providing an IP address and port number of a designated User Dictionary Server.
<UserDictServers>
	<EnableUserDictServer>true</EnableUserDictServer>
    <UserDictHost>127.0.0.1:2880</UserDictHost>
</UserDictServers>
  • As soon as the modifications are completed, restart the WebSpellChecker application server (AppServer) for the changes to take effect.


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


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


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


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

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

Step 3. Verify 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: http(s)://your_host_name:port_number/wscservice/samples/
  • Open any demo sample, e.g. SCAYT for Content Editable tags.
  • 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”.
  • Go to User Dictionaries folder (UserDictionaries) of each copy of the WebSpellChecker application server that is configured as a User Dictionary Client. This folder shouldn't contain a newly created user dictionary named “Test”. 

    The default path to the User Dictionary (UserDictionaries) folder: <WebSpellChecker_Installation_Path>/AppServer/UserDictionaries

  • 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”.


  • No labels