 |
Online Help System
|
 |
Back to Brilliant Database Web-Site |
Write to Support |
Help Index
Parser Template Designer
Parser Template Designer is used for creating templates for importing text drag-and-drop
data (parsing).
You can open Parser Template Designer in one of the following ways:
- In the Designers menu, select the Edit Custom
Import (Parsing)... menu item;
- Drag-and-drop text into the main window of the program (see Introduction).
The Parser Template Designer window is split into two parts:
Three tabs of the left pane (1) are used to edit the parser. In the
right pane (2) the imported text is displayed. Select a part of the text
and click the right mouse button to open the quick insert
menu.
You can test the operability of the template by clicking the Test Parser
button. If the parser configuration is correct, the message describing the
data fields will be displayed:
General Tab
- Parser Name - the name of the template being edited;
- Parser Behavior - this field specifies the mode of data import:
- Fill Current
Record - imported data will be entered in the current database software record;
- Create New Record - a new database software record (database software records)
based on the imported data will be created, the Separate Text By check box becomes enabled.
- Separate Text By - select this check box to split incoming text into parts, each imported as a separate database software record. In the text field under the check box specify the string that will be used as a separator. For example, if incoming text is the following:
Book: The Lord of The Rings part 1; Author: J.R.R. Tolkien;
Book: The Lord of The Rings part 2; Author: J.R.R. Tolkien;
Book: Nineteen Eighty-Four; Author: George Orwell;
The separator to be specified is ";[BR]". [BR] -
is a special character that indicates the line break.
You can specify the separator in this field using the quick
insert function.
Keywords Tab
This tab contains two lists:
These lists contain the words used by the parser to define if the current template is applicable to parsing of incoming text. For example, if the list of allowed keywords contains the phrase Price List, which is not available in the text, the text will not be parsed by this template. It is recommended that you specify the keywords that are always available in the imported text of the given type. For example, when importing a list of books, it is not appropriate to define the book titles as keywords (otherwise, another set of books won't be recognized as a set of books). Please select the titles of the fields instead, e.g., Price: and Pages:.
Disallowed keywords is an optional field. If the keywords specified in
this field can be found in the incoming text, the text won't be parsed.
It is recommended that you use this list to differentiate incoming texts for a
number of similar parsers.
You can use special symbols here. You can provide lists of keywords by using the quick insert function.
Fields/Variables Tab
Introduction
This tab is the background of any parser. It specifies how the text being
imported will be transferred to the database fields:
The upper part of the window contains the list of boundaries to be considered when parsing the incoming text and transferring it to the database. To enter the data into one field, specify the right and the left boundary of the text to be inserted. For example, for a database of books with fields Book Title, Author
and Cost, and with the following incoming text:
Book: The Lord of The Rings; Author: J.R.R. Tolkien;
Price: 30$
we can extract the data from the following fields:
- for the Book Title field, between the string "Book:
" and character ";"
- for the Author field, between the string "Author: "
and character ";"
- for the Cost field, between the string "Price: " and
character "[END]". The special character [END]
defines the end of the text.
If this data is split into strings, you can use the line
break tag
[BR].
Accordingly, for the incoming text:
Book: The Lord of The Rings
Author: J.R.R. Tolkien;
Price: 30$
The set of fields will be as follows:
- for the Book Title field, between the string "Book:
" and "[BR]".
- for the Author field, between the string "Author: "
and "[BR]"
- for the Cost field, between the string "Price: "
and "[END]".
The rules described above can be defined using Field Editor that can be opened by clicking the Add... button or the Change... :button:
If the data is parsed not into fields, but into variables, in this window you can specify the name of the variable into which the data is imported. Further these variables can be used in the script (see the Actions Tab).
Actions Tab
On this tab you can indicate the script that will be executed when the data has been recognized. If the top check box is selected, fields will not be filled and database software records will not be created automatically during parsing. Only variables will be initialized and the specified script will be executed. Thus, you can preliminarily check the data or change relational fields.
For more details, see the Script Designer section.
Quick Insert Menu
The Quick Insert Menu allows you to easily fill in various template fields with the data from the incoming text. To open the Quick Insert menu, select a part of the text and click the right mouse button:
- Set as the left boundary for the 'xxx' field - the selected text will be used as the left boundary for the current field (see the Fields
Tab);
- Set as the left boundary for the 'xxx' field - the selected text will be used as the right boundary for the current field (see the Fields
Tab);
- Add as a field data... - a new field will be added so that it contains the selected text. Accordingly, the text to the left of the selection will be inserted as the left boundary, the text to the right of the selection - as the right boundary;
- Add to allowed keywords - the selected text will be included into
the list of allowed keywords (see Keywords);
- Add to disallowed keywords - the selected text will be included
into the list of disallowed keywords (see Keywords);
- Copy to clipboard - the selected text will be copied to the MS Windows
clipboard.
See Also:
About Parsing
Special Characters
|