> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# User Dictionaries

> Create and edit user dictionaries in FlexiLayout Studio to supplement built-in dictionaries with specialized terms via DIC files or regular expressions.

A **User Dictionary** is an auxiliary dictionary created by the user that contains words not included in the built-in dictionaries. Supplement the built-in dictionaries with a user dictionary to improve the quality of data capture. Typically, a user dictionary contains specialized terms, abbreviations, company names, and so on.

You can set up and enable user dictionaries on the **Languages** tab of the **Pre-recognition Properties** dialog. To open this dialog, open the **FlexiLayout** or **Classifier** menu, click **Properties**, and then click the **Advanced pre-recognition properties...** button.

Existing user dictionaries are listed in the **User Dictionaries** field with the following information:

| Column       | Description                                          |
| ------------ | ---------------------------------------------------- |
| **Enabled**  | Indicates whether the user dictionary is being used. |
| **Name**     | The name of the custom dictionary.                   |
| **Language** | The language of the custom dictionary.               |

## Create a custom dictionary

<Steps>
  <Step title="Open the Add New Dictionary dialog box">
    On the **Languages** tab of the **Pre-recognition properties** dialog, click **Add...**.
  </Step>

  <Step title="Set the dictionary properties">
    | Property                | Description                                                                                                                                                                                                                  |
    | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
    | **Dictionary name**     | The name of the dictionary.                                                                                                                                                                                                  |
    | **Definition method**   | The dictionary type: **Dictionary file** (based on a DIC file) or **Regular expression** (based on a regular expression).                                                                                                    |
    | **Is language-neutral** | Uses the dictionary alongside all built-in dictionaries for every enabled recognition language, and sets **Language** to **Neutral** (which then cannot be changed). Available only for **Regular expression** dictionaries. |
    | **Language (locale)**   | The dictionary's language, selected from the drop-down list.                                                                                                                                                                 |

    <Note>
      A dictionary's type and language cannot be changed after the dictionary is created.
    </Note>
  </Step>

  <Step title="Save the dictionary">
    Click **OK**. A dialog box opens, listing all the dictionary's parameters.
  </Step>
</Steps>

## Edit a custom dictionary

To view or change a dictionary's properties, select the dictionary and click **Edit**.

The properties dialog has two tabs:

* The **General** tab holds the dictionary's name, type, language, and any comments. Only the name can be changed after the dictionary is created.
* The **Dictionary** tab holds settings that depend on the dictionary's type.

### Dictionary file dictionaries

A dictionary-file dictionary is based on a DIC file. To point to an existing file, click the <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_points.gif?s=494881c954b44aa8b446880d31ab4d12" alt="Browse button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="19" height="18" data-path="images/flexi-capture/fls/Button_points.gif" /> button and specify its path.

To create and populate a new file:

<Steps>
  <Step title="Create the dictionary file">
    Click **Create new dictionary...**, specify a name in the **Create New Dictionary File** dialog box, and click **OK**. The file is saved as a DIC file in the project folder.
  </Step>

  <Step title="Add and edit values in the editor">
    | Button        | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
    | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
    | **Add**       | Adds a value to a user dictionary.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
    | **Delete**    | Deletes the value currently selected in the list.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | **Import...** | Imports values from a TXT or DIC file to the user dictionary.<br />**Note.** Punctuation marks (`.,;:/*{}[]<>?` and so on) are used as separators between words in dictionaries. To use these symbols in dictionary words, place the string `DICTIONARY_PROPERTIES=USE_CONFIDENCE` at the beginning of the text file. In this case, only line-break symbols are treated as separators between words, the number after the first space in the string indicates the weight of the word, and all other symbols are ignored. |
    | **Export...** | Exports values from the dictionary to a TXT file.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
    | **Close**     | Closes the editor.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
  </Step>
</Steps>

### Regular expression dictionaries

Specify the expression. Click the <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=31d9fa9f45f477259b0ae4b0cabf8b83" alt="Expression editor button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="25" height="18" data-path="images/flexi-capture/fls/Button.gif" /> button to open a menu that helps you build the expression. For more information, see [Alphabet used in regular expressions](/flexi-capture/fls/appendix/reg-ex).

<Note>
  Words from a user dictionary have a higher priority than words from a built-in dictionary. Enabling the **Prefer words from dictionary** option further increases the priority of words from a dictionary.
</Note>

### User alphabets

You can create a user alphabet in the **Alphabet** group on the **Dictionary** tab of a dictionary's properties dialog. A user alphabet is a set of characters, separators, prefixes, and suffixes that may be used in a user dictionary. If a user alphabet is used together with a user dictionary, dictionary words that contain characters not in the user alphabet are treated as non-dictionary words. In other words, a user alphabet limits the set of characters permitted in custom dictionaries.

To specify permitted characters, enable the **Use custom alphabet** option and specify the alphabet's symbols in the text box, or click **Edit** to open the editor.

To specify permitted separators, prefixes, suffixes, and ignored characters (collectively called punctuation marks), click the **Advanced parameters** button.

In the **Advanced custom alphabet parameters** dialog box, specify the punctuation marks:

| Punctuation mark type                                 | Description                                                                      |
| ----------------------------------------------------- | -------------------------------------------------------------------------------- |
| **Punctuation marks adjoining the beginning of word** | Marks that may adjoin the start of a word, such as the underscore in `_unknown`. |
| **Punctuation marks adjoining the end of word**       | Marks that may adjoin the end of a word, such as the ampersand in `user&`.       |
| **Standalone punctuation marks**                      | Marks that may occur separately, such as the vertical bar in `January \|`.       |

In the **Exclusion characters** group of options, you can specify symbols to be ignored when words are checked against the user dictionary. For example, if you specify the regular expression `+33NNNNNNNN` and set the hyphen (`-`) as an ignored character, `+33-11111111`, `+33-111-11-111`, and `+33-111-111-11` are all considered matches for the regular expression.
