6. Predicates
add chapter

Predicates are the most important parts of a rule in C-3 Plus. They define the start, end and global condition of an item. Predicates do not have an order and they have to apply at the same time to get a result. As said before, predicates test each single word step by step.

Every function of a predicate, even when it comprises several words, tests word by word. But there are two different ways how this can happen. Either a word itself will be examined (e.g. if a word is written bold) or its position between the word before and after (e.g. after a new line) is looked at.

In addition, all predicates offer the option to negate the result found. For example, the predicate searching for words with bold letters can be also used to search for words without bold letters.

Apart from that, a few predicates have the capability not only to test a single word but also to check on a certain quantity of words before or after the word with the same predicate. That offers a possibility to restrict results to, for example, three successively bold words.

The current C-3 Plus version offers the following predicates:

6.1 Bold
add section

This predicate tests if a word is bold.

6.1.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive the programme works on the words after the search word. Is the value negative it works on the words before the search word. 

6.2 Dot Line
add section

This predicate tests if a word comes after a dot line. Therefore, the programme checks if the word before or after consists of dots.

6.2.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the dot line is before the search word.

6.3 First Word
add section

This predicate tests if the search word is at the beginning of a text or text part.

6.3.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)

6.4 Italic
add section

This predicate tests if the search word is italic.

6.4.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive the programme works on the words after the search word. Is the value negative it works on the words before the search word.

6.5 Last Word
add section

This predicate tests if the search word is the last word of a text or text part.

6.5.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)

6.6 Lower Case Letters
add section

This predicate tests if the search word is written in lowercase letters.

6.6.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme works on the words after the search word. Is the value negative, it works on the words before the search word.

6.7 New Line
add section

This predicate tests if the search word is after a new line.

6.7.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the new line is before the search word.

6.8 Normal
add section

This predicate test if the current word is NOT bold, italic or underlined.

6.8.1  Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme examines the words after the search word. Is the value negative, it examines the words before the search word.

6.9 Underlined
add section

This predicate tests if the search word is underlined.

6.9.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme works on the words after the reference word. Is the value negative, it works on the words before the reference word.

6.10 Number
add section

This predicate tests if the reference word is a number or figure.

6.10.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme works on the words after the search word. Is the value negative, it works on the words before the search word
  • Roman Numeral – Number is a Roman numeral (on/off)

6.11 Point Size Switch
add section

This predicate tests if the search word has a changed point size.

6.11.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the point size switch happens with the search word. False, if it happens after.
  • Small2large – True, if the point size changes from small to large. False, if it is the other way round.

6.12 String
add section

This predicate tests if the current word corresponds to the given string.

6.12.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme works on the words after the search word. Is the value negative, it works on the words before the search word
  • String – The compared word
  • Case Sensitive – Pay attention to the use of capital and small letters (on/off)
  • Substring – Can be a whole word or only part of it (on/off)

6.13 Upper Case Letters
add section

This predicate tests if the current word is written in upper case letters or small caps.

6.13.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Extra Words – Tests the given amount of words. Is the value positive, the programme works on the words after the search word. Is the value negative, it works on the words before the search word.

6.14  Horizontal Tabulator
add section

This predicate tests the distance before or after the search word to the next one in one line as well as to the frame. The programme calculates an arithmetic average distance by an algorithm. A threshold parameter offers the opportunity to adjust the value afterwards in smaller steps.

6.14.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the point size switch happens before the search word. False, if it happens after.
  • Threshold – Average value for the distance calculation

6.15 Vertical Tabulator
add section

This predicate tests the distance between the reference line and the lines above and below it. The programme calculates an arithmetic average distance by an algorithm. A threshold parameter offers the opportunity to adjust the value afterwards in smaller steps.

6.15.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the point size switch happens before the search word. False, if it happens after.
  • Threshold – Average value for the distance calculation

6.16 Text Block Jump
add section

This predicate tests if the reference word or the word before is the last word discovered in a textblock by the OCR.

6.16.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the text block jump is before the reference word.

6.17 Column Jump
add section

This only works with mode ‘sort column wise’!

Sort column wise means that the last word in a found column is marked. This predicate tests if the reference word or the word before, alternatively, corresponds to the marked word i.e. the last word of a OCR-found column.

6.17.1 Parameter:

  • NOT – Searches for the opposite predicate (on/off)
  • Before – True, if the column jump is before the reference word.

6.18 How to add a Predicate to a Condition
add section

Click right mouse-click on the condition (start, end, global) and select Add Predicate:

Now select predicate out of the drop-down list in the lower part of the dialogue.