You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2012/11/30 14:00:13 UTC
svn commit: r1415610 [3/4] - in
/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook:
language/ workbench/
Modified: uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.declarations.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.declarations.xml?rev=1415610&r1=1415609&r2=1415610&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.declarations.xml (original)
+++ uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.declarations.xml Fri Nov 30 13:00:11 2012
@@ -6,145 +6,145 @@
%uimaents;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<section id="ugr.tools.tm.language.declarations">
- <title>Declarations</title>
- <para>
- There are three different kinds of declarations in the
- TextMarker
- system:
- Declarations of types with optional feature
- definitions,
- declarations of variables and declarations for importing
- external
- resources, further TextMarker scripts and UIMA components
- such as type
- systems and analysis engines.
- </para>
- <section id="ugr.tools.tm.language.declarations.type">
- <title>Type</title>
- <para>
- Type declarations define new kinds of annotation types and
- optionally
- its features.
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[DECLARE SimpleType1, SimpleType2; // <- two new types with the parent
+ <title>Declarations</title>
+ <para>
+ There are three different kinds of declarations in the
+ TextMarker
+ system:
+ Declarations of types with optional feature
+ definitions,
+ declarations of variables and declarations for importing
+ external
+ resources, further TextMarker scripts and UIMA components
+ such as type
+ systems and analysis engines.
+ </para>
+ <section id="ugr.tools.tm.language.declarations.type">
+ <title>Type</title>
+ <para>
+ Type declarations define new kinds of annotation types and
+ optionally
+ its features.
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[DECLARE SimpleType1, SimpleType2; // <- two new types with the parent
// type "Annotation"
DECLARE ParentType NewType (SomeType feature1, INT feature2); // <- defines
// a new type "NewType" with parent type "ParentType" and two features]]></programlisting>
- </para>
- <para>
- Attention: Types with features need
- a parent type in its
- declaration. If no
- special parent type is
- requested, just use type
- Annotation as
- default parent
- type.
- </para>
- </section>
- </para>
- </section>
- <section id="ugr.tools.tm.language.declarations.variable">
- <title>Variable</title>
- <para>
- Variable declarations define new variables. There are 12 kinds of
- variables:
- <itemizedlist mark='opencircle'>
- <listitem>
- <para>
- Type variable: A variable that represents an annotation
- type.
- </para>
- </listitem>
- <listitem>
- <para>
- Type list variable: A variable that represents a list of
- annotation
- types.
- </para>
- </listitem>
- <listitem>
- <para>
- Integer variable: A variable that represents a integer.
- </para>
- </listitem>
- <listitem>
- <para>
- Integer list variable: A variable that represents a list of
- integers.
- </para>
- </listitem>
- <listitem>
- <para>
- Float variable: A variable that represents a
- floating-point
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- Float list variable: A variable that represents a list of
- floating-point numbers in single precision.
- </para>
- </listitem>
- <listitem>
- <para>
- Double variable: A variable that represents a
- floating-point
- number.
- </para>
- </listitem>
- <listitem>
- <para>
- Double list variable: A variable that represents a list
- of
- floating-point numbers in double precision.
- </para>
- </listitem>
- <listitem>
- <para>
- String variable: A variable that represents a string.
- </para>
- </listitem>
- <listitem>
- <para>
- String list: A variable that represents a list of strings.
- </para>
- </listitem>
- <listitem>
- <para>
- Boolean
- variable: A variable that represents a boolean.
- </para>
- </listitem>
- <listitem>
- <para>
- Boolean list variable: A variable that represents a list of
- booleans.
- </para>
- </listitem>
- </itemizedlist>
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[TYPE newTypeVariable;
+ </para>
+ <para>
+ Attention: Types with features need
+ a parent type in its
+ declaration. If no
+ special parent type is
+ requested, just use type
+ Annotation as
+ default parent
+ type.
+ </para>
+ </section>
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.declarations.variable">
+ <title>Variable</title>
+ <para>
+ Variable declarations define new variables. There are 12 kinds of
+ variables:
+ <itemizedlist mark='opencircle'>
+ <listitem>
+ <para>
+ Type variable: A variable that represents an annotation
+ type.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Type list variable: A variable that represents a list of
+ annotation
+ types.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Integer variable: A variable that represents a integer.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Integer list variable: A variable that represents a list of
+ integers.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Float variable: A variable that represents a
+ floating-point
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Float list variable: A variable that represents a list of
+ floating-point numbers in single precision.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Double variable: A variable that represents a
+ floating-point
+ number.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Double list variable: A variable that represents a list
+ of
+ floating-point numbers in double precision.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ String variable: A variable that represents a string.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ String list: A variable that represents a list of strings.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Boolean
+ variable: A variable that represents a boolean.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Boolean list variable: A variable that represents a list of
+ booleans.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[TYPE newTypeVariable;
TYPELIST newTypeList;
INT newIntegerVariable;
INTLIST newIntList;
@@ -156,102 +156,102 @@ STRING newStringVariable;
STRINGLIST newStringList;
BOOLEAN newBooleanVariable;
BOOLEANLIST newBooleanList;]]></programlisting>
- </para>
- </section>
- </para>
- </section>
- <section id="ugr.tools.tm.language.declarations.ressource">
- <title>Resources</title>
- <para>
- There are two kinds of resource declaration, that make external
- resources available in the TextMarker system:
- <itemizedlist mark='opencircle'>
- <listitem>
- <para>
- List: A list
- represents a normal text file with an entry per
- line
- or a compiled
- tree of a word list.
- </para>
- </listitem>
- <listitem>
- <para>
- Table: A table represents comma separated
- file.
- </para>
- </listitem>
- </itemizedlist>
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[WORDLIST listName = 'someWordList.txt';
+ </para>
+ </section>
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.declarations.ressource">
+ <title>Resources</title>
+ <para>
+ There are two kinds of resource declaration, that make external
+ resources available in the TextMarker system:
+ <itemizedlist mark='opencircle'>
+ <listitem>
+ <para>
+ List: A list
+ represents a normal text file with an entry per
+ line
+ or a compiled
+ tree of a word list.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Table: A table represents comma separated
+ file.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[WORDLIST listName = 'someWordList.txt';
WORDTABLE tableName = 'someTable.csv';]]></programlisting>
- </para>
- </section>
- </para>
- </section>
- <section id="ugr.tools.tm.language.declarations.scripts">
- <title>Scripts</title>
- <para>
- Additional scripts can be imported and reused with the CALL action.
- The types of the imported rules are then also available, so that it
- is
- not necessary to import the Type System of the additional rule
- script.
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[SCRIPT my.package.AnotherScript; // "AnotherScript.tm" in the "my.package"
- //package
+ </para>
+ </section>
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.declarations.scripts">
+ <title>Scripts</title>
+ <para>
+ Additional scripts can be imported and reused with the CALL action.
+ The types of the imported rules are then also available, so that it
+ is
+ not necessary to import the Type System of the additional rule
+ script.
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[SCRIPT my.package.AnotherScript; // "AnotherScript.tm" in the "my.package"
+ //package
Document{->CALL(AnotherScript)}; // <- rule executes "AnotherScript.tm"]]></programlisting>
- </para>
- </section>
- </para>
- </section>
- <section id="ugr.tools.tm.language.declarations.components">
- <title>Components</title>
- <para>
- There are two kind of UIMA components that can be imported in a
- TextMarker script:
- <itemizedlist mark='opencircle'>
- <listitem>
- <para>
- Type System: includes the types defined in an
- external type
- system.
- </para>
- </listitem>
- <listitem>
- <para>
- Analysis Engine: makes an external analysis
- engine available.
- The
- type system needed for the analysis engine has
- to be imported
- seperately. Please mind the filtering setting when
- calling an
- external analysis engine.
- </para>
- </listitem>
- </itemizedlist>
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[ENINGE my.package.ExternalEngine; // <- "ExternalEngine.xml" in the
+ </para>
+ </section>
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.declarations.components">
+ <title>Components</title>
+ <para>
+ There are two kind of UIMA components that can be imported in a
+ TextMarker script:
+ <itemizedlist mark='opencircle'>
+ <listitem>
+ <para>
+ Type System: includes the types defined in an
+ external type
+ system.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Analysis Engine: makes an external analysis
+ engine available.
+ The
+ type system needed for the analysis engine has
+ to be imported
+ seperately. Please mind the filtering setting when
+ calling an
+ external analysis engine.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[ENINGE my.package.ExternalEngine; // <- "ExternalEngine.xml" in the
// "my.package" package (in the descriptor folder)
TYPESYSTEM my.package.ExternalTypeSystem; // <- "ExternalTypeSystem.xml"
// in the "my.package" package (in the descriptor folder)
Document{->RETAINTYPE(SPACE,BREAK),CALL(ExternalEngine)};
// calls ExternalEngine, but retains white spaces]]></programlisting>
- </para>
- </section>
- </para>
- </section>
+ </para>
+ </section>
+ </para>
+ </section>
</section>
\ No newline at end of file
Modified: uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.expressions.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.expressions.xml?rev=1415610&r1=1415609&r2=1415610&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.expressions.xml (original)
+++ uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.expressions.xml Fri Nov 30 13:00:11 2012
@@ -6,91 +6,91 @@
%uimaents;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<section id="ugr.tools.tm.language.expressions">
- <title>Expressions</title>
- <para>
- TexMarker provides five different kinds of expressions. These are
- type expressions, number expressions, string expressions and
- boolean expressions and list expressions.
- </para>
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
+ <title>Expressions</title>
+ <para>
+ TexMarker provides five different kinds of expressions. These are
+ type expressions, number expressions, string expressions and
+ boolean expressions and list expressions.
+ </para>
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
<programlisting><![CDATA[
TextmarkerExpression -> TypeExpression | NumberExpression |
StringExpression | BooleanExpression
| ListExpression
]]></programlisting>
- </para>
- </section>
+ </para>
+ </section>
- <section id="ugr.tools.tm.language.expressions.type">
- <title>Type Expressions</title>
- <para>
- TextMarker provides two kinds of type expressions.
- <orderedlist numeration="arabic">
- <listitem>
- Declared annotation types (see
- <xref linkend='ugr.tools.tm.language.declarations.type' />
- ).
- </listitem>
- <listitem>
- Type variables
- (see
- <xref linkend='ugr.tools.tm.language.declarations.variable' />
- )
- </listitem>
- </orderedlist>
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
+ <section id="ugr.tools.tm.language.expressions.type">
+ <title>Type Expressions</title>
+ <para>
+ TextMarker provides two kinds of type expressions.
+ <orderedlist numeration="arabic">
+ <listitem>
+ Declared annotation types (see
+ <xref linkend='ugr.tools.tm.language.declarations.type' />
+ ).
+ </listitem>
+ <listitem>
+ Type variables
+ (see
+ <xref linkend='ugr.tools.tm.language.declarations.variable' />
+ )
+ </listitem>
+ </orderedlist>
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
<programlisting><![CDATA[
TypeExpression -> AnnotationType | TypeVariable
]]></programlisting>
- </para>
- </section>
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[DECLARE Author; // Author defines a type, therefore it is a type expression
-TYPE typeVar; // type variable typeVar is a type expression
+ </para>
+ </section>
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[DECLARE Author; // Author defines a type, therefore it is a type expression
+TYPE typeVar; // type variable typeVar is a type expression
Document{->ASSIGN(typeVar, Author)};]]></programlisting>
- </para>
- </section>
- </para>
- </section>
+ </para>
+ </section>
+ </para>
+ </section>
- <section id="ugr.tools.tm.language.expressions.number">
- <title>Number Expressions</title>
- <para>
- TextMarker provides several possibilities to define number
- expressions. As expected, every number expression evaluates to a
- number. TextMarker supports integer and floating-point numbers. A
- floating-point number can be in single or in double precision. To get
- a complete overview, have a look at the following syntax definition
- of number expressions.
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[
+ <section id="ugr.tools.tm.language.expressions.number">
+ <title>Number Expressions</title>
+ <para>
+ TextMarker provides several possibilities to define number
+ expressions. As expected, every number expression evaluates to a
+ number. TextMarker supports integer and floating-point numbers. A
+ floating-point number can be in single or in double precision. To get
+ a complete overview, have a look at the following syntax definition
+ of number expressions.
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[
NumberExpression -> AdditiveExpression
AdditiveExpression -> MultiplicativeExpression ( ( "+" | "-" )
MultiplicativeExpression )*
@@ -106,176 +106,176 @@ FloatingPointLiteral -> Digit+ '.' Digi
| '.' Digit+ Exponent? FloatTypeSuffix?
| Digit+ Exponent FloatTypeSuffix?
| Digit+ Exponent? FloatTypeSuffix
-FloatTypeSuffix -> ('f'|'F'|'d'|'D')
+FloatTypeSuffix -> ('f'|'F'|'d'|'D')
Exponent -> ('e'|'E') ('+'|'-')? Digit+
Digit -> ('0'..'9') ]]></programlisting>
- </para>
- </section>
- <para>
- For more information on number variables, see
- <xref linkend='ugr.tools.tm.language.declarations.variable' />
- .
- </para>
- <section>
- <title>
- <emphasis role="bold">Examples:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[98 // a integer number literal
-104L // a integer number literal
-170.02 // a floating-point number literal
+ </para>
+ </section>
+ <para>
+ For more information on number variables, see
+ <xref linkend='ugr.tools.tm.language.declarations.variable' />
+ .
+ </para>
+ <section>
+ <title>
+ <emphasis role="bold">Examples:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[98 // a integer number literal
+104L // a integer number literal
+170.02 // a floating-point number literal
1.0845D // a floating-point number literal in double precision]]></programlisting>
- </para>
- <para>
- <programlisting><![CDATA[INT intVar1;
+ </para>
+ <para>
+ <programlisting><![CDATA[INT intVar1;
INT intVar2;
...
Document{->ASSIGN(intVar1, 12 * intVar1 - SIN(intVar2))};]]></programlisting>
- </para>
- </section>
- </para>
- </section>
+ </para>
+ </section>
+ </para>
+ </section>
- <section id="ugr.tools.tm.language.expressions.string">
- <title>String Expressions</title>
- <para>
- There are two kinds of string expressions in TextMarker.
- <orderedlist numeration="arabic">
- <listitem>
- String literals: String literals are defined by any sequence of
- characters within quotation marks.
- </listitem>
- <listitem>
- String variables (see
- <xref linkend='ugr.tools.tm.language.declarations.variable' />
- )
- </listitem>
- </orderedlist>
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[StringExpression -> SimpleStringExpression
-SimpleStringExpression -> StringLiteral | StringVariable]]></programlisting>
- </para>
- </section>
- <section>
- <title>
- <emphasis role="bold">Example:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[STRING strVar; // strVar is a string expression
+ <section id="ugr.tools.tm.language.expressions.string">
+ <title>String Expressions</title>
+ <para>
+ There are two kinds of string expressions in TextMarker.
+ <orderedlist numeration="arabic">
+ <listitem>
+ String literals: String literals are defined by any sequence of
+ characters within quotation marks.
+ </listitem>
+ <listitem>
+ String variables (see
+ <xref linkend='ugr.tools.tm.language.declarations.variable' />
+ )
+ </listitem>
+ </orderedlist>
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[StringExpression -> SimpleStringExpression
+SimpleStringExpression -> StringLiteral | StringVariable]]></programlisting>
+ </para>
+ </section>
+ <section>
+ <title>
+ <emphasis role="bold">Example:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[STRING strVar; // strVar is a string expression
Document{->ASSIGN(strVar, "strLiteral")}; // "strLiteral" is a string
// expression]]></programlisting>
- </para>
- </section>
- </para>
- </section>
+ </para>
+ </section>
+ </para>
+ </section>
- <section id="ugr.tools.tm.language.expressions.boolean">
- <title>Boolean Expressions</title>
- <para>
- TextMarker provides several possibilities to define boolean
- expressions. As expected, every boolean expression evaluates to
- either
- true or false. To get a complete overview, have a look at the
- following syntax definition of boolean expressions.
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[BooleanExpression -> ComposedBooleanExpression
+ <section id="ugr.tools.tm.language.expressions.boolean">
+ <title>Boolean Expressions</title>
+ <para>
+ TextMarker provides several possibilities to define boolean
+ expressions. As expected, every boolean expression evaluates to
+ either
+ true or false. To get a complete overview, have a look at the
+ following syntax definition of boolean expressions.
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[BooleanExpression -> ComposedBooleanExpression
| SimpleBooleanExpression
ComposedBooleanExpression -> BooleanCompare | BooleanTypeExpression
| BooleanNumberExpression | BooleanFunction
-SimpleBooleanExpression -> BooleanLiteral | BooleanVariable
+SimpleBooleanExpression -> BooleanLiteral | BooleanVariable
BooleanCompare -> SimpleBooleanExpression ( "==" | "!=" )
BooleanExpression
BooleanTypeExpression -> TypeExpression ( "==" | "!=" ) TypeExpression
BooleanNumberExpression -> "(" NumberExpression ( "<" | "<=" | ">"
| ">=" | "==" | "!=" ) NumberExpression ")"
-BooleanFunction -> XOR "(" BooleanExpression "," BooleanExpression ")"
+BooleanFunction -> XOR "(" BooleanExpression "," BooleanExpression ")"
BooleanLiteral -> "true" | "false"]]></programlisting>
- </para>
- <para>
- Boolean variables are defined in
- <xref linkend='ugr.tools.tm.language.declarations.variable' />
- .
- </para>
- </section>
- <section>
- <title>
- <emphasis role="bold">Examples:</emphasis>
- </title>
- <para>
- <programlisting><![CDATA[Document{->ASSIGN(boolVar, false)};]]></programlisting>
- </para>
- <para>
- The boolean literal 'false' is assigned to boolean variable
- boolVar.
- </para>
- <para>
- <programlisting><![CDATA[Document{->ASSIGN(boolVar, typeVar == Author)};]]></programlisting>
- </para>
- <para>
- If type variable typeVar represents annotation type Author,
- the
- boolean
- type expression evaluates to true, otherwise it evaluates
- to
- false. The result is assigned to boolean variable boolVar.
- </para>
- <para>
- <programlisting><![CDATA[Document{->ASSIGN(boolVar, (intVar == 10))};]]></programlisting>
- </para>
- <para>
- This rule shows a boolean number expression. If the value in
- variable intVar is equal to 10, the boolean number expression
- evaluates to true, otherwise it evaluates to
- false. The result is
- assigned to boolean variable boolVar. The brackets
- surrounding the number expression are necessary.
- </para>
- <para>
- <programlisting><![CDATA[Document{->ASSIGN(booleanVar1, booleanVar2 == (10 > intVar))};]]></programlisting>
- </para>
- <para>
- This rule shows a more complex boolean expression. If the
- value
- in
- variable intVar is equal to 10, the boolean number
- expression
- evaluates to true, otherwise it evaluates to
- false. The
- result of
- this
- evaluation is compared to booleanVar2. The end result
- is
- assigned to
- boolean variable boolVar1. Realize that the syntax
- definition defines
- exactly this order. It is not possible to have
- the
- boolean number
- expression on the left side of the complex number
- expression.
- </para>
- </section>
- </para>
- </section>
-
+ </para>
+ <para>
+ Boolean variables are defined in
+ <xref linkend='ugr.tools.tm.language.declarations.variable' />
+ .
+ </para>
+ </section>
+ <section>
+ <title>
+ <emphasis role="bold">Examples:</emphasis>
+ </title>
+ <para>
+ <programlisting><![CDATA[Document{->ASSIGN(boolVar, false)};]]></programlisting>
+ </para>
+ <para>
+ The boolean literal 'false' is assigned to boolean variable
+ boolVar.
+ </para>
+ <para>
+ <programlisting><![CDATA[Document{->ASSIGN(boolVar, typeVar == Author)};]]></programlisting>
+ </para>
+ <para>
+ If type variable typeVar represents annotation type Author,
+ the
+ boolean
+ type expression evaluates to true, otherwise it evaluates
+ to
+ false. The result is assigned to boolean variable boolVar.
+ </para>
+ <para>
+ <programlisting><![CDATA[Document{->ASSIGN(boolVar, (intVar == 10))};]]></programlisting>
+ </para>
+ <para>
+ This rule shows a boolean number expression. If the value in
+ variable intVar is equal to 10, the boolean number expression
+ evaluates to true, otherwise it evaluates to
+ false. The result is
+ assigned to boolean variable boolVar. The brackets
+ surrounding the number expression are necessary.
+ </para>
+ <para>
+ <programlisting><![CDATA[Document{->ASSIGN(booleanVar1, booleanVar2 == (10 > intVar))};]]></programlisting>
+ </para>
+ <para>
+ This rule shows a more complex boolean expression. If the
+ value
+ in
+ variable intVar is equal to 10, the boolean number
+ expression
+ evaluates to true, otherwise it evaluates to
+ false. The
+ result of
+ this
+ evaluation is compared to booleanVar2. The end result
+ is
+ assigned to
+ boolean variable boolVar1. Realize that the syntax
+ definition defines
+ exactly this order. It is not possible to have
+ the
+ boolean number
+ expression on the left side of the complex number
+ expression.
+ </para>
+ </section>
+ </para>
+ </section>
+
<section id="ugr.tools.tm.language.expressions.lists">
- <title>List Expressions</title>
- <para>
- List expression are a rather simple kind of expression.
- <section>
- <title>
- <emphasis role="bold">Definition:</emphasis>
- </title>
- <para>
+ <title>List Expressions</title>
+ <para>
+ List expression are a rather simple kind of expression.
+ <section>
+ <title>
+ <emphasis role="bold">Definition:</emphasis>
+ </title>
+ <para>
<programlisting><![CDATA[
ListExpression -> WordListExpression | WordTableExpression |
TypeListExpression | NumberListExpression |
@@ -288,15 +288,15 @@ NumberListExpression -> IntListVariab
StringListExpression -> StringListVariable
BooleanListExpression -> BooleanListVariable
]]></programlisting>
- A ResourceLiteral is something
- like 'folder/file.txt' (Attention: Use single quotes).
- </para>
- <para>
- List variables are defined in
- <xref linkend='ugr.tools.tm.language.declarations.variable' />
- .
- </para>
- </section>
- </para>
- </section>
+ A ResourceLiteral is something
+ like 'folder/file.txt' (Attention: Use single quotes).
+ </para>
+ <para>
+ List variables are defined in
+ <xref linkend='ugr.tools.tm.language.declarations.variable' />
+ .
+ </para>
+ </section>
+ </para>
+ </section>
</section>
\ No newline at end of file
Modified: uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.quantifier.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.quantifier.xml?rev=1415610&r1=1415609&r2=1415610&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.quantifier.xml (original)
+++ uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.quantifier.xml Fri Nov 30 13:00:11 2012
@@ -6,139 +6,139 @@
%uimaents;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<section id="ugr.tools.tm.language.quantifier">
- <title>Quantifiers</title>
- <para>
- </para>
- <section id="ugr.tools.tm.language.quantifier.sg">
- <title>* Star Greedy</title>
- <para>
- The Star Greedy quantifier matches on any amount of annotations and
- evaluates always true. Please mind, that a rule element with a Star
- Greedy quantifier needs to match on different annotations than the
- next rule element.
+ <title>Quantifiers</title>
+ <para>
+ </para>
+ <section id="ugr.tools.tm.language.quantifier.sg">
+ <title>* Star Greedy</title>
+ <para>
+ The Star Greedy quantifier matches on any amount of annotations and
+ evaluates always true. Please mind, that a rule element with a Star
+ Greedy quantifier needs to match on different annotations than the
+ next rule element.
- Examples:
- <programlisting><![CDATA[Input: small Big Big Big small
+ Examples:
+ <programlisting><![CDATA[Input: small Big Big Big small
Rule: CW*
Matched: Big Big Big
Matched: Big Big
Matched: Big]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.sr">
- <title>*? Star Reluctant</title>
- <para>
- The Star Reluctant quantifier matches on any amount of annotations
- and evaluates always true, but stops to match on new annotations,
- when the next rule element matches and evaluates true on this
- annotation.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.sr">
+ <title>*? Star Reluctant</title>
+ <para>
+ The Star Reluctant quantifier matches on any amount of annotations
+ and evaluates always true, but stops to match on new annotations,
+ when the next rule element matches and evaluates true on this
+ annotation.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small small Big
Rule: W*? CW
Matched: small small Big
Matched: small Big
Matched: Big]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.pg">
- <title>+ Plus Greedy</title>
- <para>
- The Plus Greedy quantifier needs to match on at least one
- annotation.
- Please mind, that a rule element after a rule element
- with a Plus
- Greedy quantifier matches and evaluates on different
- conditions.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.pg">
+ <title>+ Plus Greedy</title>
+ <para>
+ The Plus Greedy quantifier needs to match on at least one
+ annotation.
+ Please mind, that a rule element after a rule element
+ with a Plus
+ Greedy quantifier matches and evaluates on different
+ conditions.
- Examples:
+ Examples:
- <programlisting><![CDATA[Input: 123 456 small small Big
+ <programlisting><![CDATA[Input: 123 456 small small Big
Rule: SW+
Matched: small small
Matched: small]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.pr">
- <title>+? Plus Reluctant</title>
- <para>
- The Plus Reluctant quantifier has to match on at least one
- annotation
- in order to evaluate true, but stops when the next rule
- element is
- able to match on this annotation.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.pr">
+ <title>+? Plus Reluctant</title>
+ <para>
+ The Plus Reluctant quantifier has to match on at least one
+ annotation
+ in order to evaluate true, but stops when the next rule
+ element is
+ able to match on this annotation.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small small Big
Rule: W+? CW
Matched: small small Big]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.qg">
- <title>? Question Greedy</title>
- <para>
- The Question Greedy quantifier matches optionally on an annotation
- and therefore always evaluates true.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.qg">
+ <title>? Question Greedy</title>
+ <para>
+ The Question Greedy quantifier matches optionally on an annotation
+ and therefore always evaluates true.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small Big small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small Big small Big
Rule: SW CW? SW
Matched: small Big small]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.qr">
- <title>?? Question Reluctant</title>
- <para>
- The Question Reluctant quantifier matches optionally on an
- annotation
- if the next rule element can not match on the same
- annotation and
- therefore always evaluates true.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.qr">
+ <title>?? Question Reluctant</title>
+ <para>
+ The Question Reluctant quantifier matches optionally on an
+ annotation
+ if the next rule element can not match on the same
+ annotation and
+ therefore always evaluates true.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small Big small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small Big small Big
Rule: SW CW?? SW
Matched: small Big small]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.mmg">
- <title>[x,y] Min Max Greedy</title>
- <para>
- The Min Max Greedy quantifier has to match at least x and at most y
- annotations of its rule element to evaluate true.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.mmg">
+ <title>[x,y] Min Max Greedy</title>
+ <para>
+ The Min Max Greedy quantifier has to match at least x and at most y
+ annotations of its rule element to evaluate true.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small Big small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small Big small Big
Rule: SW CW[1,2] SW
Matched: small Big small]]></programlisting>
- </para>
- </section>
- <section id="ugr.tools.tm.language.quantifier.mmr">
- <title>[x,y]? Min Max Reluctant</title>
- <para>
- The Min Max Greedy quantifier has to match at least x and at most y
- annotations of its rule element to evaluate true, but stops to
- match
- on additional annotations if the next rule element is able to
- match
- on
- this annotation.
+ </para>
+ </section>
+ <section id="ugr.tools.tm.language.quantifier.mmr">
+ <title>[x,y]? Min Max Reluctant</title>
+ <para>
+ The Min Max Greedy quantifier has to match at least x and at most y
+ annotations of its rule element to evaluate true, but stops to
+ match
+ on additional annotations if the next rule element is able to
+ match
+ on
+ this annotation.
- Examples:
- <programlisting><![CDATA[Input: 123 456 small Big Big Big small Big
+ Examples:
+ <programlisting><![CDATA[Input: 123 456 small Big Big Big small Big
Rule: SW CW[2,100]? SW
Matched: small Big Big Big small]]></programlisting>
- </para>
- </section>
+ </para>
+ </section>
</section>
\ No newline at end of file
Modified: uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.syntax.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.syntax.xml?rev=1415610&r1=1415609&r2=1415610&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.syntax.xml (original)
+++ uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/language/tools.textmarker.language.syntax.xml Fri Nov 30 13:00:11 2012
@@ -6,27 +6,27 @@
%uimaents;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<section id="ugr.tools.tm.language.syntax">
- <title>Syntax</title>
- <para>
- TextMarker defines its own language for writing rules and rule
- scripts. This section gives a formal overview of its syntax.
- </para>
- <para>
- Structure: The overall structure of a TextMarker
- script is defined by
- the following syntax.
- <programlisting><![CDATA[Script -> PackageDeclaration GlobalStatements Statements
+ <title>Syntax</title>
+ <para>
+ TextMarker defines its own language for writing rules and rule
+ scripts. This section gives a formal overview of its syntax.
+ </para>
+ <para>
+ Structure: The overall structure of a TextMarker
+ script is defined by
+ the following syntax.
+ <programlisting><![CDATA[Script -> PackageDeclaration GlobalStatements Statements
PackageDeclaration -> "PACKAGE" DottedIdentifier ";"
GlobalStatments -> GlobalStatement*
GlobalStatment -> ("TYPESYSTEM" | "SCRIPT" | "ENGINE")
@@ -35,12 +35,12 @@ Statements -> Statement*
Statement -> Declaration | VariableDeclaration | BlockDeclaration
| AutomataDeclaration | SimpleStatement ";"
]]></programlisting>
- Comments are excluded from the syntax definition. Comments start with
- "//" and always go to the end of the line.
- </para>
- <para>
- Example beginning of a TextMarker file:
- <programlisting><![CDATA[PACKAGE de.uniwue.example;
+ Comments are excluded from the syntax definition. Comments start with
+ "//" and always go to the end of the line.
+ </para>
+ <para>
+ Example beginning of a TextMarker file:
+ <programlisting><![CDATA[PACKAGE de.uniwue.example;
// import the types of this type system
// (located in the descriptor folder -> de.uniwue.example folder)
@@ -51,8 +51,8 @@ SCRIPT de.uniwue.example.Title;
SCRIPT de.uniwue.example.Year;
]]></programlisting>
- Syntax of declarations:
- <programlisting><![CDATA[Declaration -> "DECLARE" (AnnotationType)? Identifier ("," Identifier )*
+ Syntax of declarations:
+ <programlisting><![CDATA[Declaration -> "DECLARE" (AnnotationType)? Identifier ("," Identifier )*
| "DECLARE" AnnotationType Identifier ( "("
FeatureDeclaration ")" )?
FeatureDeclaration -> ( (AnnotationType | "STRING" | "INT" | "FLOAT"
@@ -86,8 +86,8 @@ AutomataDeclaration -> "RULES" "(" Id
"{" Statements "}"
]]></programlisting>
- Syntax of statements and rule elements
- <programlisting><![CDATA[SimpleStatement -> RuleElements ";"
+ Syntax of statements and rule elements
+ <programlisting><![CDATA[SimpleStatement -> RuleElements ";"
RuleElements -> RuleElement+
RuleElement -> RuleElementType | RuleElementLiteral
| RuleElementComposed | RuleElementDisjunctive
@@ -108,19 +108,19 @@ QuantifierPart -> "*" | "*?" | "
Conditions -> Condition ( "," Condition )*
Actions -> "->" Action ( "," Action)*
]]></programlisting>
- Since each condition and each action has its own syntax, conditions
- and actions are described in their own section. (For conditions see
- <xref linkend='ugr.tools.tm.language.conditions' />
- , for actions see
- <xref linkend='ugr.tools.tm.language.actions' />
- The syntax of expressions is explained in
- <xref linkend='ugr.tools.tm.language.expressions' />
- </para>
- <para>
- Identifier
- <programlisting><![CDATA[DottedIdentifier -> Identifier ("." Identifier)*
+ Since each condition and each action has its own syntax, conditions
+ and actions are described in their own section. (For conditions see
+ <xref linkend='ugr.tools.tm.language.conditions' />
+ , for actions see
+ <xref linkend='ugr.tools.tm.language.actions' />
+ The syntax of expressions is explained in
+ <xref linkend='ugr.tools.tm.language.expressions' />
+ </para>
+ <para>
+ Identifier
+ <programlisting><![CDATA[DottedIdentifier -> Identifier ("." Identifier)*
DottedIdentifier2 -> Identifier (("."|"-") Identifier)*
Identifier -> letter (letter|digit)*
]]></programlisting>
- </para>
+ </para>
</section>
\ No newline at end of file
Modified: uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/workbench/tools.textmarker.workbench.explain_perspective.xml
URL: http://svn.apache.org/viewvc/uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/workbench/tools.textmarker.workbench.explain_perspective.xml?rev=1415610&r1=1415609&r2=1415610&view=diff
==============================================================================
--- uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/workbench/tools.textmarker.workbench.explain_perspective.xml (original)
+++ uima/sandbox/trunk/TextMarker/uima-docbook-textmarker/src/docbook/workbench/tools.textmarker.workbench.explain_perspective.xml Fri Nov 30 13:00:11 2012
@@ -6,410 +6,410 @@
%uimaents;
]>
<!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor
- license agreements. See the NOTICE file distributed with this work for additional
- information regarding copyright ownership. The ASF licenses this file to
- you under the Apache License, Version 2.0 (the "License"); you may not use
- this file except in compliance with the License. You may obtain a copy of
- the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
- by applicable law or agreed to in writing, software distributed under the
- License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
- OF ANY KIND, either express or implied. See the License for the specific
- language governing permissions and limitations under the License. -->
+ license agreements. See the NOTICE file distributed with this work for additional
+ information regarding copyright ownership. The ASF licenses this file to
+ you under the Apache License, Version 2.0 (the "License"); you may not use
+ this file except in compliance with the License. You may obtain a copy of
+ the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required
+ by applicable law or agreed to in writing, software distributed under the
+ License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
+ OF ANY KIND, either express or implied. See the License for the specific
+ language governing permissions and limitations under the License. -->
<section id="section.ugr.tools.tm.workbench.explain_perspective">
- <title>Explain Perspective</title>
- <para>
- Writing new rules is laborious, especially if the newly written
- rules do not
- behave as
- expected. The TextMarker system is able to
- protocol the application of each
- single rule and
- block in order to
- provide an explanation of the rule inference and a
- minimal debugging
- functionality. The information about the application of the rules
- itself is stored
- in the resulting
- xmiCAS output file if the parameters
- of the executed engine are
- configured correctly. The simplest way to
- generate these explanation information
- is to click on the common
- 'Debug' button (looks like a green bug)
- while having the TextMarker
- script file, you want to debug, active in
- your editor. The current
- TextMarker file will then be executed on the text files in the input
- directory and xmiCAS are
- created in the output directory containing the
- additional UIMA
- feature structures describing the
- rule inference. To
- show the newly created execution information, you can either open the
- Explain
- perspective or open the necessary views separately and arrange
- them as you like. There are eight
- views that display information about
- the execution of
- the rules: Applied Rules, Covering Rules, Created By,
- Failed Rules, Matched Rules, Rule Elements, Rule List
- and Statistics.
- All of theses views are further explained in detail, using the
- TextMarker example project
- for examples.
- </para>
+ <title>Explain Perspective</title>
+ <para>
+ Writing new rules is laborious, especially if the newly written
+ rules do not
+ behave as
+ expected. The TextMarker system is able to
+ protocol the application of each
+ single rule and
+ block in order to
+ provide an explanation of the rule inference and a
+ minimal debugging
+ functionality. The information about the application of the rules
+ itself is stored
+ in the resulting
+ xmiCAS output file if the parameters
+ of the executed engine are
+ configured correctly. The simplest way to
+ generate these explanation information
+ is to click on the common
+ 'Debug' button (looks like a green bug)
+ while having the TextMarker
+ script file, you want to debug, active in
+ your editor. The current
+ TextMarker file will then be executed on the text files in the input
+ directory and xmiCAS are
+ created in the output directory containing the
+ additional UIMA
+ feature structures describing the
+ rule inference. To
+ show the newly created execution information, you can either open the
+ Explain
+ perspective or open the necessary views separately and arrange
+ them as you like. There are eight
+ views that display information about
+ the execution of
+ the rules: Applied Rules, Covering Rules, Created By,
+ Failed Rules, Matched Rules, Rule Elements, Rule List
+ and Statistics.
+ All of theses views are further explained in detail, using the
+ TextMarker example project
+ for examples.
+ </para>
- <para>
- To make it possible to reproduce all of the examples used below,
- switch to the TextMarker Explain perspective within your Eclipse
- workbench.
- Import the TextMarker example project and open the main
- TextMarker script file 'Main.tm'. Now press the 'Debug' button
- and wait
- for the end of execution. Open the resulting xmiCAS file
- 'Test1.txt.xmi', which you can find in the output folder.
- </para>
+ <para>
+ To make it possible to reproduce all of the examples used below,
+ switch to the TextMarker Explain perspective within your Eclipse
+ workbench.
+ Import the TextMarker example project and open the main
+ TextMarker script file 'Main.tm'. Now press the 'Debug' button
+ and wait
+ for the end of execution. Open the resulting xmiCAS file
+ 'Test1.txt.xmi', which you can find in the output folder.
+ </para>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.applied_rules">
- <title>Applied Rules</title>
- <para>
- The Applied Rules view displays structured information about all
- rules that tried to apply to the input documents.
- </para>
- <para>
- The structure is as
- follows: if BLOCK constructs were used in the
- executed TextMarker
- file, the rules contained in that block will be
- represented as child
- node in the tree of the view. Each TextMarker
- file is itself a BLOCK
- construct named after the file. Therefore the
- root node of the view
- is always a BLOCK containing the rules of the
- executed TextMarker
- script. Additionally, if a rule calls a different
- TextMarker file,
- then the root block of that file is the child of the
- calling rule.
- </para>
- <para>
- If you double-click on one of the rules, the related script file
- is opened within the editor and the rule itself is selected.
- </para>
- <para>
- <xref linkend='section.ugr.tools.tm.workbench.explain_perspective' />
- shows the whole rule hierarchy resulting from the TextMarker example
- project. The root of the whole hierarchy is the BLOCK associated to
- the 'Main.tm' script. On the next level, the rules called by the
- 'Main.tm' script are listed. Since there is a call to each of the
- script files 'Year.tm',
- 'Author.tm' and 'Title.tm', these are included
- into the hierarchy, each forming their own block.
- </para>
- <para>
- The following image shows the TextMarker Applied Rules view.
- <figure
- id="figure.ugr.tools.tm.workbench.explain_perspective.applied_rules">
- <title> Applied Rules view
- </title>
- <mediaobject>
- <imageobject role="html">
- <imagedata width="576px" format="PNG" align="center"
- fileref="&imgroot;explain/applied_rules_view.png" />
- </imageobject>
- <imageobject role="fo">
- <imagedata width="5.5in" format="PNG" align="center"
- fileref="&imgroot;explain/applied_rules_view.png" />
- </imageobject>
- <textobject>
- <phrase>
- Applied Rules view.
- </phrase>
- </textobject>
- </mediaobject>
- </figure>
- </para>
- <para>
- Besides the hierarchy, the view shows how often a rule tried to match
- in total and how often it succeeded. This is shown in brackets at the
- beginning of each rule entry. E.g., the Applied Rules view tells us
- that the rule
- <literal>NUM{REGEXP("19..|20..") -> MARK(Year)};</literal>
- within script 'Year.tm' tried to match twice but only succeeded once.
- </para>
- <para>
- After this information the rule itself is given. Notice that
- each rule
- is given with all the parameters it has been executed.
- E.g., have a
- look at rule entry
- <literal>[1/1]Document{->MARKFAST(FirstName,FirstNameList,false,0,true)}
- </literal>
- within BLOCK Author. The rule obviously has been executed with five
- parameters. If you double-click on this rule, you will get to the
- rule in the script file 'Author.tm'. It shows the rule as follows:
- <literal>Document{-> MARKFAST(FirstName, FirstNameList)};
- </literal>
- . This means the last three parameters have been default values used
- to execute the rule.
- </para>
- <para>
- Additionally some profiling information, giving details about
- the absolute time and the percentage of total execution time the rule
- needed, is added at the end of each rule entry.
- </para>
- <para>
- The selection (single-click) of a rule in this view will
- directly change the information visualized in the views Failed Rules
- and Matched Rules.
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.applied_rules">
+ <title>Applied Rules</title>
+ <para>
+ The Applied Rules view displays structured information about all
+ rules that tried to apply to the input documents.
+ </para>
+ <para>
+ The structure is as
+ follows: if BLOCK constructs were used in the
+ executed TextMarker
+ file, the rules contained in that block will be
+ represented as child
+ node in the tree of the view. Each TextMarker
+ file is itself a BLOCK
+ construct named after the file. Therefore the
+ root node of the view
+ is always a BLOCK containing the rules of the
+ executed TextMarker
+ script. Additionally, if a rule calls a different
+ TextMarker file,
+ then the root block of that file is the child of the
+ calling rule.
+ </para>
+ <para>
+ If you double-click on one of the rules, the related script file
+ is opened within the editor and the rule itself is selected.
+ </para>
+ <para>
+ <xref linkend='section.ugr.tools.tm.workbench.explain_perspective' />
+ shows the whole rule hierarchy resulting from the TextMarker example
+ project. The root of the whole hierarchy is the BLOCK associated to
+ the 'Main.tm' script. On the next level, the rules called by the
+ 'Main.tm' script are listed. Since there is a call to each of the
+ script files 'Year.tm',
+ 'Author.tm' and 'Title.tm', these are included
+ into the hierarchy, each forming their own block.
+ </para>
+ <para>
+ The following image shows the TextMarker Applied Rules view.
+ <figure
+ id="figure.ugr.tools.tm.workbench.explain_perspective.applied_rules">
+ <title> Applied Rules view
+ </title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata width="576px" format="PNG" align="center"
+ fileref="&imgroot;explain/applied_rules_view.png" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata width="5.5in" format="PNG" align="center"
+ fileref="&imgroot;explain/applied_rules_view.png" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ Applied Rules view.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </para>
+ <para>
+ Besides the hierarchy, the view shows how often a rule tried to match
+ in total and how often it succeeded. This is shown in brackets at the
+ beginning of each rule entry. E.g., the Applied Rules view tells us
+ that the rule
+ <literal>NUM{REGEXP("19..|20..") -> MARK(Year)};</literal>
+ within script 'Year.tm' tried to match twice but only succeeded once.
+ </para>
+ <para>
+ After this information the rule itself is given. Notice that
+ each rule
+ is given with all the parameters it has been executed.
+ E.g., have a
+ look at rule entry
+ <literal>[1/1]Document{->MARKFAST(FirstName,FirstNameList,false,0,true)}
+ </literal>
+ within BLOCK Author. The rule obviously has been executed with five
+ parameters. If you double-click on this rule, you will get to the
+ rule in the script file 'Author.tm'. It shows the rule as follows:
+ <literal>Document{-> MARKFAST(FirstName, FirstNameList)};
+ </literal>
+ . This means the last three parameters have been default values used
+ to execute the rule.
+ </para>
+ <para>
+ Additionally some profiling information, giving details about
+ the absolute time and the percentage of total execution time the rule
+ needed, is added at the end of each rule entry.
+ </para>
+ <para>
+ The selection (single-click) of a rule in this view will
+ directly change the information visualized in the views Failed Rules
+ and Matched Rules.
+ </para>
+ </section>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules">
- <title>Matched Rules and Failed Rules</title>
- <para>
- If a rule is selected (single-click) in the Applied Rules view,
- then the Matched Rules view displays all instances (text passages) on
- which the rule matched. On the contrary, the Failed Rules view shows
- the instances on which the rule tried but failed to match.
- </para>
- <para>
- E.g. select rule
- <literal>[2/3]Name{-PARTOF(NameListPart)} NameLinker[1,2]{->
- MARK(NameListPart,1,2)}
- </literal>
- within BLOCK Author.
- <xref
- linkend='figure.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules' />
- shows the text passages this rule tried to match on. One did not
- succeed. Therefore it is displayed within the Failed Rules view. Two
- succeeded and are shown in the Matched Rules view.
- </para>
- <para>
- The following image shows the TextMarker Applied Rules view.
- <figure
- id="figure.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules">
- <title> The views Matched Rules and Failed Rules
- </title>
- <mediaobject>
- <imageobject role="html">
- <imagedata width="576px" format="PNG" align="center"
- fileref="&imgroot;explain/matched_and_failed.png" />
- </imageobject>
- <imageobject role="fo">
- <imagedata width="5.5in" format="PNG" align="center"
- fileref="&imgroot;explain/matched_and_failed.png" />
- </imageobject>
- <textobject>
- <phrase>
- The views Matched Rules and Failed Rules.
- </phrase>
- </textobject>
- </mediaobject>
- </figure>
- </para>
- <para>
- The selection (single-click) of one of the text passages in
- either Matched Rules view or Failed Rules view will directly change
- the information visualized in the Rule Elements view.
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules">
+ <title>Matched Rules and Failed Rules</title>
+ <para>
+ If a rule is selected (single-click) in the Applied Rules view,
+ then the Matched Rules view displays all instances (text passages) on
+ which the rule matched. On the contrary, the Failed Rules view shows
+ the instances on which the rule tried but failed to match.
+ </para>
+ <para>
+ E.g. select rule
+ <literal>[2/3]Name{-PARTOF(NameListPart)} NameLinker[1,2]{->
+ MARK(NameListPart,1,2)}
+ </literal>
+ within BLOCK Author.
+ <xref
+ linkend='figure.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules' />
+ shows the text passages this rule tried to match on. One did not
+ succeed. Therefore it is displayed within the Failed Rules view. Two
+ succeeded and are shown in the Matched Rules view.
+ </para>
+ <para>
+ The following image shows the TextMarker Applied Rules view.
+ <figure
+ id="figure.ugr.tools.tm.workbench.explain_perspective.matched_and_failed_rules">
+ <title> The views Matched Rules and Failed Rules
+ </title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata width="576px" format="PNG" align="center"
+ fileref="&imgroot;explain/matched_and_failed.png" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata width="5.5in" format="PNG" align="center"
+ fileref="&imgroot;explain/matched_and_failed.png" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The views Matched Rules and Failed Rules.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </para>
+ <para>
+ The selection (single-click) of one of the text passages in
+ either Matched Rules view or Failed Rules view will directly change
+ the information visualized in the Rule Elements view.
+ </para>
+ </section>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.rule_elements">
- <title>Rule Elements</title>
- <para>
- If you select one of the listed instances in the Matched or
- Failed Rules view,
- then the Rule Elements view contains a listing
- of
- the rule elements and their
- conditions belonging to the related rule
- used on the specific text passage. There is detailed
- information
- available on what text
- passage each rule element did or
- did not match
- and which condition did
- or did not evaluate true.
- </para>
- <para>
- Within the Rule Elements view, each rule element generates its
- own explanation hierarchy. On the root level the rule element itself
- is given. An apostrophe at the beginning of the rule element
- indicates that this rule was the anchor for the rule execution. On
- the next level the text passage on which the rule element tried to
- match on is given. The last level then explains why the rule element
- did or did not match. The first entry on this level tells if the text
- passage is of the requested annotation type. If it is, a green hook
- is shown in front of the requested type. Otherwise a red cross is
- shown. In the following the rule conditions and their evaluation on
- the given text passage are shown.
- </para>
- <para>
- In the previous example, select the listed instance
- <literal>Bethard, S.</literal>
- . The Rule Elements view then shows the related explanation displayed
- in
- <xref
- linkend='figure.ugr.tools.tm.workbench.explain_perspective.rule_elements' />
- .
- </para>
- <para>
- The following image shows the TextMarker Rule Elements view.
- <figure
- id="figure.ugr.tools.tm.workbench.explain_perspective.rule_elements">
- <title> The views Matched Rules and Failed Rules
- </title>
- <mediaobject>
- <imageobject role="html">
- <imagedata width="250px" format="PNG" align="center"
- fileref="&imgroot;explain/rule_elments.png" />
- </imageobject>
- <imageobject role="fo">
- <imagedata width="3.5in" format="PNG" align="center"
- fileref="&imgroot;explain/rule_elements.png" />
- </imageobject>
- <textobject>
- <phrase>
- The Rule Elements view.
- </phrase>
- </textobject>
- </mediaobject>
- </figure>
- </para>
- <para>
- As you can see, the first rule element
- <literal>Name{-PARTOF(NameListPart)}</literal>
- matched on the text passage
- <literal>Bethard, S.</literal>
- since it is firstly annotated with an
- <quote>Name</quote>
- annotation and secondly it is not part of an annotation
- <quote>NameListPart</quote>
- . But as this first text passage is not followed by a
- <quote>NameLinker</quote>
- annotation the whole rule fails.
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.rule_elements">
+ <title>Rule Elements</title>
+ <para>
+ If you select one of the listed instances in the Matched or
+ Failed Rules view,
+ then the Rule Elements view contains a listing
+ of
+ the rule elements and their
+ conditions belonging to the related rule
+ used on the specific text passage. There is detailed
+ information
+ available on what text
+ passage each rule element did or
+ did not match
+ and which condition did
+ or did not evaluate true.
+ </para>
+ <para>
+ Within the Rule Elements view, each rule element generates its
+ own explanation hierarchy. On the root level the rule element itself
+ is given. An apostrophe at the beginning of the rule element
+ indicates that this rule was the anchor for the rule execution. On
+ the next level the text passage on which the rule element tried to
+ match on is given. The last level then explains why the rule element
+ did or did not match. The first entry on this level tells if the text
+ passage is of the requested annotation type. If it is, a green hook
+ is shown in front of the requested type. Otherwise a red cross is
+ shown. In the following the rule conditions and their evaluation on
+ the given text passage are shown.
+ </para>
+ <para>
+ In the previous example, select the listed instance
+ <literal>Bethard, S.</literal>
+ . The Rule Elements view then shows the related explanation displayed
+ in
+ <xref
+ linkend='figure.ugr.tools.tm.workbench.explain_perspective.rule_elements' />
+ .
+ </para>
+ <para>
+ The following image shows the TextMarker Rule Elements view.
+ <figure
+ id="figure.ugr.tools.tm.workbench.explain_perspective.rule_elements">
+ <title> The views Matched Rules and Failed Rules
+ </title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata width="250px" format="PNG" align="center"
+ fileref="&imgroot;explain/rule_elments.png" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata width="3.5in" format="PNG" align="center"
+ fileref="&imgroot;explain/rule_elements.png" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Rule Elements view.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </para>
+ <para>
+ As you can see, the first rule element
+ <literal>Name{-PARTOF(NameListPart)}</literal>
+ matched on the text passage
+ <literal>Bethard, S.</literal>
+ since it is firstly annotated with an
+ <quote>Name</quote>
+ annotation and secondly it is not part of an annotation
+ <quote>NameListPart</quote>
+ . But as this first text passage is not followed by a
+ <quote>NameLinker</quote>
+ annotation the whole rule fails.
+ </para>
+ </section>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.covering_rules">
- <title>Covering Rules</title>
- <para>
- This views is very similar to the Applied Rules view, but
- displays only rules and blocks under a given selection. If the user
- clicks on any position in the xmiCAS document, an Covering Rules view
- is generated containing only rule elements that affect that position
- in the document. The Matched Rules,
- Failed Rules and Rule Elements
- views
- then only contain match
- information
- of that position.
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.covering_rules">
+ <title>Covering Rules</title>
+ <para>
+ This views is very similar to the Applied Rules view, but
+ displays only rules and blocks under a given selection. If the user
+ clicks on any position in the xmiCAS document, an Covering Rules view
+ is generated containing only rule elements that affect that position
+ in the document. The Matched Rules,
+ Failed Rules and Rule Elements
+ views
+ then only contain match
+ information
+ of that position.
+ </para>
+ </section>
- <section id="section.ugr.tools.tm.workbench.explain_perspective.rule_list">
- <title>Rule List</title>
- <para>
- This views is very similar to the Applied Rules view and the
- Covering Rules view, but displays only rules and NO blocks under a
- given selection. If the user clicks on any position in the xmiCAS
- document, a list of rules, that matched or tried to match on that
- position in the document, is generated within the Rule List view. The
- Matched Rules, Failed Rules and Rule Elements views then only contain
- match information of that position. Additionally, this view provides
- a text field for filtering the rules. Only those rules remain that
- contain the entered text.
- </para>
- </section>
+ <section id="section.ugr.tools.tm.workbench.explain_perspective.rule_list">
+ <title>Rule List</title>
+ <para>
+ This views is very similar to the Applied Rules view and the
+ Covering Rules view, but displays only rules and NO blocks under a
+ given selection. If the user clicks on any position in the xmiCAS
+ document, a list of rules, that matched or tried to match on that
+ position in the document, is generated within the Rule List view. The
+ Matched Rules, Failed Rules and Rule Elements views then only contain
+ match information of that position. Additionally, this view provides
+ a text field for filtering the rules. Only those rules remain that
+ contain the entered text.
+ </para>
+ </section>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.created_by">
- <title>Created By</title>
- <para>
- The Created By view tells you which rule created a specific
- annotation. To get this information just select an annotation in the
- Annotation Browser. After doing this the Created By view shows the
- related information.
- </para>
- <para>
- To see how this works, use the example project and go to the
- Annotation view. Select the
- <quote>d.u.e.Year</quote>
- annotation
- <quote>(2008)</quote>
- . The Created By view displays the information, seen in
- <xref linkend='figure.ugr.tools.tm.workbench.explain_perspective.created_by' />
- . You can double-click on the shown rule to jump to the related
- document
- <quote>Year.tm</quote>
- .
- </para>
- <para>
- The following image shows the TextMarker Created By view.
- <figure
- id="figure.ugr.tools.tm.workbench.explain_perspective.created_by">
- <title> The Created By view
- </title>
- <mediaobject>
- <imageobject role="html">
- <imagedata width="560px" format="PNG" align="center"
- fileref="&imgroot;explain/created_by.png" />
- </imageobject>
- <imageobject role="fo">
- <imagedata width="5.5in" format="PNG" align="center"
- fileref="&imgroot;explain/created_by.png" />
- </imageobject>
- <textobject>
- <phrase>
- The Created By view.
- </phrase>
- </textobject>
- </mediaobject>
- </figure>
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.created_by">
+ <title>Created By</title>
+ <para>
+ The Created By view tells you which rule created a specific
+ annotation. To get this information just select an annotation in the
+ Annotation Browser. After doing this the Created By view shows the
+ related information.
+ </para>
+ <para>
+ To see how this works, use the example project and go to the
+ Annotation view. Select the
+ <quote>d.u.e.Year</quote>
+ annotation
+ <quote>(2008)</quote>
+ . The Created By view displays the information, seen in
+ <xref linkend='figure.ugr.tools.tm.workbench.explain_perspective.created_by' />
+ . You can double-click on the shown rule to jump to the related
+ document
+ <quote>Year.tm</quote>
+ .
+ </para>
+ <para>
+ The following image shows the TextMarker Created By view.
+ <figure
+ id="figure.ugr.tools.tm.workbench.explain_perspective.created_by">
+ <title> The Created By view
+ </title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata width="560px" format="PNG" align="center"
+ fileref="&imgroot;explain/created_by.png" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata width="5.5in" format="PNG" align="center"
+ fileref="&imgroot;explain/created_by.png" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Created By view.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </section>
- <section
- id="section.ugr.tools.tm.workbench.explain_perspective.statistics">
- <title>Statistics</title>
- <para>
- The Statistics view displays profiling information for the used
- conditions and actions of the TextMarker language. Three
- numbers are
- given for each element: The total time of execution, the amount of
- executions and the average time per execution.
- </para>
- <para>
- The following image shows the TextMarker Statistics view generated
- form the TextMarker example project.
- <figure
- id="figure.ugr.tools.tm.workbench.explain_perspective.statistics">
- <title> The Statistics view
- </title>
- <mediaobject>
- <imageobject role="html">
- <imagedata width="300px" format="PNG" align="center"
- fileref="&imgroot;explain/statistics.png" />
- </imageobject>
- <imageobject role="fo">
- <imagedata width="4.0in" format="PNG" align="center"
- fileref="&imgroot;explain/statistics.png" />
- </imageobject>
- <textobject>
- <phrase>
- The Statistics view.
- </phrase>
- </textobject>
- </mediaobject>
- </figure>
- </para>
- </section>
+ <section
+ id="section.ugr.tools.tm.workbench.explain_perspective.statistics">
+ <title>Statistics</title>
+ <para>
+ The Statistics view displays profiling information for the used
+ conditions and actions of the TextMarker language. Three
+ numbers are
+ given for each element: The total time of execution, the amount of
+ executions and the average time per execution.
+ </para>
+ <para>
+ The following image shows the TextMarker Statistics view generated
+ form the TextMarker example project.
+ <figure
+ id="figure.ugr.tools.tm.workbench.explain_perspective.statistics">
+ <title> The Statistics view
+ </title>
+ <mediaobject>
+ <imageobject role="html">
+ <imagedata width="300px" format="PNG" align="center"
+ fileref="&imgroot;explain/statistics.png" />
+ </imageobject>
+ <imageobject role="fo">
+ <imagedata width="4.0in" format="PNG" align="center"
+ fileref="&imgroot;explain/statistics.png" />
+ </imageobject>
+ <textobject>
+ <phrase>
+ The Statistics view.
+ </phrase>
+ </textobject>
+ </mediaobject>
+ </figure>
+ </para>
+ </section>
</section>
\ No newline at end of file