> ## 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.

# Sample 1. Step 12: Describe the YOUR PLANET NAME field with a PlanetName element

> Step 12 of FlexiLayout Studio Sample 1: describe the YOUR PLANET NAME field with a Character String element using alphabets, counts, and relations.

The **YOUR PLANET NAME** field always contains a single line. Its value varies, unlike the field name, so define it as a [Character String](/flexi-capture/fls/template/character-chain) element.

<Steps>
  <Step title="Create the Character String element">
    Create an element of type **Character String** and name it **PlanetName**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/tutorial14.png?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=dab3187a03b869a2208b9314b1945e88" alt="Screenshot of the General tab of the Character String element properties in ABBYY FlexiLayout Studio showing the new element named PlanetName." width="431" height="455" data-path="images/flexi-capture/fls/tutorial14.png" />
    </Frame>
  </Step>

  <Step title="Open the Character String tab">
    Click the **Character String** tab.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/tutorial15.png?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=1b95dae9aa3609296a332a9670913099" alt="Screenshot of the Character String tab of the PlanetName element properties in ABBYY FlexiLayout Studio where the alphabet and character settings are configured." width="431" height="455" data-path="images/flexi-capture/fls/tutorial15.png" />
    </Frame>
  </Step>

  <Step title="Set the alphabet">
    The alphabet is all the characters that may appear in planet and satellite names. In the test images, these are English letters and parentheses.

    To set it, click **Add...** and select the required characters in the **Add New Alphabet** dialog box.

    <Note>
      The selected characters appear in the **Character Set** column (on the **Character String** tab, in the **Alphabets** field).
    </Note>
  </Step>

  <Step title="Set the percentage of alphabet characters">
    In the **Percentage of alphabet characters** field, enter 100. FlexiLayout Studio then considers only this element's characters when searching for the **PlanetName** object.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/tutorial16.png?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=cfdf7c051549358187f121ebdf9723ae" alt="Screenshot of the Character String tab of the PlanetName element properties in ABBYY FlexiLayout Studio showing the configured alphabet with the Percentage of alphabet characters set to 100." width="536" height="350" data-path="images/flexi-capture/fls/tutorial16.png" />
    </Frame>

    <Note>
      You can specify several alphabets for one element. In the **Percentage of alphabet characters** field, specify the maximum percentage of characters from each alphabet.
    </Note>
  </Step>

  <Step title="Disable embedded hypotheses">
    Clear the **Allow embedded hypotheses** check box. This lets FlexiLayout Studio formulate hypotheses of the maximum length that meet all search criteria.

    Otherwise, FlexiLayout Studio may formulate several embedded hypotheses, each consisting of portions of one of the selected alphabets (taking into account the allowed percentage of non-alphabet characters).
  </Step>

  <Step title="Set the percentage of non-alphabet characters">
    In the **Percentage of non-alphabet characters** field, set the maximum to 10%.

    This value can only be selected by trial and error, and you can change it when adjusting the FlexiLayout.
  </Step>

  <Step title="Set the character count">
    In the **Character count** field, specify this fuzzy range: `{0, 3, 35, 100}`. This estimates the string length, assuming planet names have 3 to 35 characters. Any hypotheses outside this range are penalized.

    This value can only be selected by trial and error, and you can change it when adjusting the FlexiLayout.
  </Step>

  <Step title="Open the Relations tab">
    Click the **Relations** tab.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/tutorial17.png?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=3ed0369fcfcddcab52c19714ac065f2b" alt="Screenshot of the Relations tab of the PlanetName element properties in ABBYY FlexiLayout Studio where relations to the reference element are defined." width="431" height="455" data-path="images/flexi-capture/fls/tutorial17.png" />
    </Frame>
  </Step>

  <Step title="Set the reference element">
    Use the **PlanetNameHeader** element as the reference element for the **PlanetName** element. The planet name always appears to the right of the field name, on the same level. Specify the element's location relative to the field name and its top and bottom boundaries.

    Otherwise, FlexiLayout Studio treats any text fragment in the alphabet as a valid hypothesis, even one above or below the field name.
  </Step>

  <Step title="Place the element to the right of the reference">
    Specify that the **PlanetName** element is to the right of the **PlanetNameHeader** element.

    1. Click **Add**.
    2. In the dialog box that opens, select **PlanetNameHeader** in the **Reference element** field.
    3. From the **Type** drop-down list, select **Right of** and leave the default **Offset** value of 0.
    4. Click **Add Relation**.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/tutorial18.png?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=2feb59de665c0f020fb3590b585b1e19" alt="Screenshot of the Add Relation dialog box in ABBYY FlexiLayout Studio with PlanetNameHeader chosen as the reference element, the Right of relation type, and an Offset of 0." width="416" height="282" data-path="images/flexi-capture/fls/tutorial18.png" />
    </Frame>
  </Step>

  <Step title="Set the lower boundary of the search area">
    Specify that the **PlanetName** element is not lower than the **PlanetNameHeader** element.

    1. Click **Add**.
    2. In the dialog box that opens, select **PlanetNameHeader** in the **Reference element** field.
    3. In the **Type** drop-down list, select **Above** and set **Offset** to -100 (this value can only be selected by trial and error).
    4. Click **Add Relation**.

    This gives FlexiLayout Studio some flexibility when locating the element relative to the name. The negative **Offset** value means the element is above the bottom boundary of the name.
  </Step>

  <Step title="Set the upper boundary of the search area">
    Specify that the **PlanetName** element is not higher than the **PlanetNameHeader** element.

    1. Click **Add**.
    2. In the dialog box that opens, select **PlanetNameHeader** in the **Reference element** field.
    3. In the **Type** drop-down list, select **Below** and set **Offset** to -100 (this value can only be selected by trial and error).
    4. Click **Add Relation**.

    This gives FlexiLayout Studio some flexibility when locating the element relative to the name. The negative **Offset** value means the element is below the top boundary of the name.
  </Step>
</Steps>

## How the Reference boundary field works

The **Reference boundary** field determines how positive **Offset** values constrain the search area:

* If you select **\<whole>**, positive **Offset** values allow only these locations:
  * To the right of the right boundary of the element
  * To the left of the left boundary
  * Higher than the top boundary
  * Lower than the bottom boundary
* If you select **Top** and **Bottom**, positive **Offset** values limit the search area by the top and bottom boundaries of the element and exclude hypotheses that go beyond the top and bottom boundaries of the field name.
