English (English)

Sample 2. Step 24: Creating a CookingDescription block

To create the CookingInstructions block:

  1. Click the FlexiLayout tab in the program main window.
  2. Select the Blocks object in the FlexiLayout tree.
  3. Select Blocks → Add Block → Text in the FlexiLayout menu or in the shortcut menu.
  4. In the Properties dialog box, specify the name of the block in the Name field: CookingInstructions.
  5. To describe the location of the block, select Expression.
  6. You must describe the location of the block so that it includes only the cooking instructions and the number of servings. The block must not include unwanted text (i.e. any text that may precede the word "Serves"). Describe the block as a collection of rectangles around the following elements: CookingDescription, Serves and Servings. This method allows you to specify non-rectangular regions.
    In the FlexiLayout language this must be written as follows:
    RectArray outputRectArray;
    //initializing the variable with the help of an empty constructor
    outputRectArray = RectArray();
    //adding the rectangles of the hypotheses of three elements
    outputRectArray.Add ( SearchElements.Cooking.Description.CookingInstructions.Rect );
    outputRectArray.Add( SearchElements.Cooking.Description.Serves.Rect );
    outputRectArray.Add( SearchElements.Cooking.Description.Servings.Rect );
    OutputRegion = Region( outputRectArray );

4/12/2024 6:16:02 PM

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.