Skip to content

module__Assert

Robert Bossy edited this page Jul 27, 2017 · 1 revision

#org.bibliome.alvisnlp.modules.Assert

Synopsis

Tests an assertion on specified elements.

Description

org.bibliome.alvisnlp.modules.Assert evaluates target as a list of elements. Then, for each element, evaluates assertion as a boolean. org.bibliome.alvisnlp.modules.Assert reports each element for which assertion is false. org.bibliome.alvisnlp.modules.Assert aborts the processing of the corpus if severe is true.

Parameters

Optional

Type: Expression

Expression evaluated as a boolean with the target element as the context element. This parameter specifies the assertion to be checked on each target.

Optional

Type: Expression

Expression evaluated as a list of elements with the corpus as the context element. This parameter specifies the elements on which the assertion is checked.

Optional

Type: Expression

Customize the assertion failure message. This expression is evaluated as a string from the failed target.

Optional

Type: TargetStream

Path to the file where to record assertion failures. If not set then assertion failures are not recorded, and only displayed on the log.

Optional

Type: Integer

Maximum number of assertion failures before org.bibliome.alvisnlp.modules.Assert will stop checking.

Default value: true

Type: Boolean

If true and there is at least one assertion failure, then org.bibliome.alvisnlp.modules.Assert will abort the processing of the corpus.

Clone this wiki locally