Skip to content

Work with extraction rules

Steps

1

Create an extraction rule using smart completion

Open a rules file.

Start writing the various elements that are needed to build an extraction rule.

Notice that the system will automatically prompt you the possible variants to complete the word as soon as you start typing, as well as automatically close brackets once you open them. Press Enter to accept the suggestion and auto-complete the word.

2

Use the SYNCON attribute in your extraction rule

Place the cursor inside the square brackets of the extraction rule.

Use the keyboard shortcut Ctrl+Shift+S to open the Knowledge Graph tool window (or open the Knowledge Graph via the related tool window).

Type the concept you are looking for in the search box. Double click the syncon you want for your rule.

Select Commit at the bottom-right of the Knowledge Graph tool window to send the syncon to your rule.

Select Build or press F6 to build the project, then select Analyze Document or press F5 after selecting a document in the editor.

You can check the results in the Extraction tool window at the bottom. Expand the extraction record and select the extracted field to see the hits in the text.

With the SYNCON attribute all the lemmas that express a specific concept will be retrieved.

3

Use the ANCESTOR attribute in your extraction rule

Place the cursor inside the square brackets of your rule and open the Knowledge Graph tool window.

Type the concept you are looking for in the search box. Double click the ancestor you need in your rule.

Beside the Commit button, select the ANCESTOR option from the drop-down menu.

Select Commit at the bottom-right of the Knowledge Graph tool window to send the ancestor to your rule.

Select Build to build the project or press F6, then select Analyze Document or press F5 to analyze a selected document. You can check the results in the Extraction tool window at the bottom. Expand the extraction record and select the extracted field to see the hits in the text.

The ANCESTOR attribute will not only retrieve the concepts belonging to the selected syncon, but also the children that are part of its semantic chain in the Knowledge Graph.

4

Apply your extraction rules to test documents and see results

In the upper right corner, select Analyze All Documents and choose a name for your report.

Select the Report tool window and you will find your analysis report. Double-click it and you will see the list of the analyzed documents with information about the results. You can filter the results and leave for example only the information about extraction.

Open the documents by double-clicking them and check the extraction results in the Extraction tool window at the bottom. Expand the extraction records and select the extracted field to see the hits in the text.