You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2006/11/30 15:45:10 UTC
svn commit: r480944 [2/2] -
/incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/uima/annotator_analysis_engine_guide.xml
Modified: incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/uima/annotator_analysis_engine_guide.xml
URL: http://svn.apache.org/viewvc/incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/uima/annotator_analysis_engine_guide.xml?view=diff&rev=480944&r1=480943&r2=480944
==============================================================================
--- incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/uima/annotator_analysis_engine_guide.xml (original)
+++ incubator/uima/uimaj/trunk/uima-docbooks/src/docbook/uima/annotator_analysis_engine_guide.xml Thu Nov 30 06:45:09 2006
@@ -23,197 +23,197 @@
specific language governing permissions and limitations
under the License.
-->
-<chapter id="ugr.annotator_analysis_engine_guide">
- <title>Annotator and Analysis Engine Developer's Guide</title>
-
-<para>This chapter describes how to develop UIMA <emphasis>type systems</emphasis>,
-<emphasis>Annotators</emphasis> and <emphasis>Analysis Engines</emphasis> using the UIMA SDK. It is helpful to read the UIMA Conceptual
-Overview chapter for a review on these concepts.</para>
-
-<para>An <emphasis>Analysis Engine (AE)</emphasis> is a program that
-analyzes artifacts (e.g. documents) and infers information from them.</para>
-
-<para>Analysis Engines are constructed from
-building blocks called <emphasis>Annotators</emphasis>.
-An annotator is a component that contains analysis logic. Annotators analyze an artifact (for example,
-a text document) and create additional data (metadata) about that artifact. It is a goal of UIMA that annotators
-need not be concerned with anything other than their analysis logic – for
-example the details of their deployment or their interaction with other annotators.</para>
-
-<para>An Analysis Engine (AE) may contain a single annotator
-(this is referred to as a <emphasis>Primitive AE)</emphasis>, or it may be a composition of
-others and therefore contain multiple annotators (this is referred to as an <emphasis>Aggregate
-AE</emphasis>). Primitive and aggregate AEs
-implement the same interface and can be used interchangeably by applications.</para>
-
-<para>Annotators produce their analysis results in the form of
-typed <emphasis>Feature Structures</emphasis>, which are simply data structures that have a
-type and a set of (attribute, value) pairs. An <emphasis>annotation</emphasis> is a particular type of Feature Structure that is
-attached to a region of the artifact being analyzed (a span of text in a
-document, for example).</para>
-
-<para>For example, an annotator may produce an Annotation over
-the span of text <literal>President Bush</literal>, where the type of
-the Annotation is <literal>Person</literal> and the attribute <literal>fullName</literal> has the value <literal>George W. Bush</literal>,
-and its position in the artifact is character position 12 through character
-position 26.</para>
-
-<para>It is also possible for annotators to record information
-associated with the entire document rather than a particular span (these are
-considered Feature Structures but not Annotations).</para>
-
-<para>All feature structures, including annotations, are
-represented in the UIMA <emphasis>Common Analysis Structure(CAS)</emphasis>. The CAS is the central data structure through
-which all UIMA components communicate. Included with the UIMA SDK is an easy-to-use, native Java interface to
-the CAS called the <emphasis>JCas</emphasis>. The JCas
-represents each feature structure as a Java object; the example feature
-structure from the previous paragraph would be an instance of a Java class
-Person with getFullName() and setFullName() methods. Though the examples in this guide all use the
-JCas, it is also possible to directly access the underlying CAS system; for
-more information see
- <olink targetdoc="&uima_docs_ref;" targetptr="ugr.ref.cas"/>.</para>
-
-<para>The remainder of this chapter will refer to the analysis
-of text documents and the creation of annotations that are attached to spans of
-text in those documents. Keep in mind
-that the CAS can represent arbitrary types of feature structures, and feature
-structures can refer to other feature structures. For example, you can use the CAS to represent
-a parse tree for a document. Also, the
-artifact that you are analyzing need not be a text document.</para>
-
-<para>This guide is organized as follows:</para>
-
+<chapter id="ugr.aae">
+ <title>Annotator and Analysis Engine Developer's Guide</title>
+
+ <para>This chapter describes how to develop UIMA <emphasis>type systems</emphasis>,
+ <emphasis>Annotators</emphasis> and <emphasis>Analysis Engines</emphasis> using
+ the UIMA SDK. It is helpful to read the UIMA Conceptual Overview chapter for a review on
+ these concepts.</para>
+
+ <para>An <emphasis>Analysis Engine (AE)</emphasis> is a program that analyzes artifacts
+ (e.g. documents) and infers information from them.</para>
+
+ <para>Analysis Engines are constructed from building blocks called
+ <emphasis>Annotators</emphasis>. An annotator is a component that contains analysis
+ logic. Annotators analyze an artifact (for example, a text document) and create
+ additional data (metadata) about that artifact. It is a goal of UIMA that annotators need
+ not be concerned with anything other than their analysis logic – for example the
+ details of their deployment or their interaction with other annotators.</para>
+
+ <para>An Analysis Engine (AE) may contain a single annotator (this is referred to as a
+ <emphasis>Primitive AE)</emphasis>, or it may be a composition of others and therefore
+ contain multiple annotators (this is referred to as an <emphasis>Aggregate
+ AE</emphasis>). Primitive and aggregate AEs implement the same interface and can be used
+ interchangeably by applications.</para>
+
+ <para>Annotators produce their analysis results in the form of typed <emphasis>Feature
+ Structures</emphasis>, which are simply data structures that have a type and a set of
+ (attribute, value) pairs. An <emphasis>annotation</emphasis> is a particular type of
+ Feature Structure that is attached to a region of the artifact being analyzed (a span of
+ text in a document, for example).</para>
+
+ <para>For example, an annotator may produce an Annotation over the span of text
+ <literal>President Bush</literal>, where the type of the Annotation is
+ <literal>Person</literal> and the attribute <literal>fullName</literal> has the
+ value <literal>George W. Bush</literal>, and its position in the artifact is character
+ position 12 through character position 26.</para>
+
+ <para>It is also possible for annotators to record information associated with the entire
+ document rather than a particular span (these are considered Feature Structures but not
+ Annotations).</para>
+
+ <para>All feature structures, including annotations, are represented in the UIMA
+ <emphasis>Common Analysis Structure(CAS)</emphasis>. The CAS is the central data
+ structure through which all UIMA components communicate. Included with the UIMA SDK is an
+ easy-to-use, native Java interface to the CAS called the <emphasis>JCas</emphasis>.
+ The JCas represents each feature structure as a Java object; the example feature
+ structure from the previous paragraph would be an instance of a Java class Person with
+ getFullName() and setFullName() methods. Though the examples in this guide all use the
+ JCas, it is also possible to directly access the underlying CAS system; for more
+ information see <olink targetdoc="&uima_docs_ref;" targetptr="ugr.ref.cas"/>
+ .</para>
+
+ <para>The remainder of this chapter will refer to the analysis of text documents and the
+ creation of annotations that are attached to spans of text in those documents. Keep in mind
+ that the CAS can represent arbitrary types of feature structures, and feature structures
+ can refer to other feature structures. For example, you can use the CAS to represent a parse
+ tree for a document. Also, the artifact that you are analyzing need not be a text
+ document.</para>
+
+ <para>This guide is organized as follows:</para>
+
<itemizedlist>
<listitem>
- <para><emphasis role="bolditalic"><xref linkend="ugr.tug.aae.getting_started"/></emphasis>
- is a tutorial with step-by-step instructions for how to develop and test a simple UIMA annotator.</para>
+ <para><emphasis role="bolditalic"><xref
+ linkend="ugr.tug.aae.getting_started"/></emphasis> is a tutorial with
+ step-by-step instructions for how to develop and test a simple UIMA
+ annotator.</para>
</listitem>
<listitem>
- <para><emphasis role="bolditalic"><xref linkend="ugr.tug.aae.configuration_logging"/></emphasis> discusses how to make your UIMA annotator
-configurable, and how it can write messages to the UIMA log file.</para>
+ <para><emphasis role="bolditalic"><xref
+ linkend="ugr.tug.aae.configuring_logging"/></emphasis> discusses how to
+ make your UIMA annotator configurable, and how it can write messages to the UIMA log
+ file.</para>
</listitem>
<listitem>
-<para>
- <emphasis role="bolditalic"><xref linkend="ugr.tug.aae.building_aggregates"/></emphasis>
- describes how annotators can be combined into
-aggregate analysis engines. It also
-describes how one annotator can make use of the analysis results produced by an
-annotator that has run previously.</para>
+ <para> <emphasis role="bolditalic"><xref
+ linkend="ugr.tug.aae.building_aggregates"/></emphasis> describes how
+ annotators can be combined into aggregate analysis engines. It also describes how
+ one annotator can make use of the analysis results produced by an annotator that has
+ run previously.</para>
</listitem>
</itemizedlist>
-
-<para><emphasis role="bolditalic">Other examples</emphasis></para>
-
-<para>The UIMA SDK include several other examples you may find
-interesting, including</para>
-
-
-<itemizedlist spacing="compact"><listitem><para>SimpleTokenAndSentenceAnnotator –
-a simple tokenizer and sentence annotator.</para></listitem>
-
-
-<listitem><para>PersonTitleDBWriterCasConsumer – a
-sample CAS Consumer which populates a relational database with some
-annotations. It uses JDBC and in this
-example, hooks up with the Open Source Apache Derby database.
-</para></listitem></itemizedlist>
-
-<para><emphasis role="bolditalic">Additional Topics</emphasis> describes
-additional features of the UIMA SDK that may help you in building your own annotators
-and analysis engines.</para>
-
-<para><emphasis role="bolditalic"><xref linkend="ugr.tug.aae.common_pitfalls"/></emphasis>
- contains some useful guidelines to help you
-ensure that your annotators will work correctly in any UIMA application.</para>
-
-<para>This guide does not discuss how to build UIMA
-Applications, which are programs that use Analysis Engines, along with other
-components, e.g. a search engine, document store, and user interface, to
-deliver a complete package of functionality to an end-user. For information on
-application development, see
- <olink targetdoc="&uima_docs_tutorial_guides;" targetptr="ugr.tug.app_dev"/>.</para>
-
-
-<section id="ugr.tug.getting_started">
- <title>Getting Started</title>
-
-<para>This section is a
-step-by-step tutorial that will get you started developing UIMA annotators. All of the files referred to by the examples
-in this chapter are in the docs/examples directory of the UIMA SDK. This directory is designed to be imported
-into your Eclipse workspace; see
- <olink targetdoc="&uima_docs_overview;" targetptr="ugr.eclipse_setup.example_code"/> for instructions on how to do this. Also you
-may wish to refer to the UIMA SDK JavaDocs located in the
- <ulink url="file:api/index.html">docs/api</ulink> directory.</para>
-
-<note><para>In Eclipse 3.1, if you highlight a UIMA class or method defined in the
-UIMA SDK JavaDocs, you can conveniently have Eclipse open the corresponding
-JavaDoc for that class or method in a browser, by pressing Shift + F2.</para></note>
-
-<para>The example annotator
-that we are going to walk through will detect room numbers for rooms where the room numbering scheme follows
- some simple conventions. In our example, there are two kinds of patterns we want to find; here are some examples,
-together with their corresponding regular expression patterns:
-<variablelist>
- <varlistentry>
- <term>Yorktown patterns:</term>
- <listitem><para> 20-001, 31-206, 04-123(Regular Expression Pattern: ##-[0-2]##)</para></listitem>
- </varlistentry>
- <varlistentry>
- <term>Hawthorne patterns:</term>
- <listitem><para>GN-K35, 1S-L07, 4N-B21
- (Regular Expression Pattern: [G1-4][NS]-[A-Z]##)</para></listitem>
- </varlistentry>
-</variablelist>
-</para>
-
-<para>There are several steps to develop and test a simple UIMA annotator.</para>
-
-<orderedlist spacing="compact"><listitem><para>Define the CAS types that the annotator
-will use.</para></listitem>
-
-<listitem><para>Generate the Java classes for these types.</para></listitem>
-
-<listitem><para>Write the actual annotator Java code.</para></listitem>
-
-<listitem><para>Create the Analysis Engine descriptor.</para></listitem>
-
-<listitem><para>Test the annotator.
-</para></listitem></orderedlist>
-
-<para>These steps are
-discussed in the next sections.</para>
-
+ <para><emphasis role="bolditalic">Other examples</emphasis></para>
- <section id="ugr.tug.aae.defining_types">
- <title>Defining Types</title>
-
- <para>The first step in developing an annotator is to define the
-CAS Feature Structure types that it creates. This is done in an XML file called a <emphasis>Type System Descriptor</emphasis>. UIMA
-defines some basic built-in CAS types such as TOP, Boolean, Byte, Short, Integer,
-Long, Float, Double, Arrays of primitives and FSArray, and Annotation. TOP is the root of the type system, analogous
-to Object in Java. FSArray is an array of Feature Structures (i.e. an array of instances of TOP).</para>
-
-<para>UIMA includes an Eclipse plug-in that will help you edit
-Type System Descriptors, so if you are using Eclipse you will not need to worry
-about the details of the XML syntax. See
- <olink targetdoc="&uima_docs_overview;" targetptr="ugr.eclipse_setup"/>
- for instructions on setting up
-Eclipse and installing the plugin.</para>
-
-<para>The Type System Descriptor for our annotator is located in
-the file <literal>descriptors/tutorial/ex1/TutorialTypeSystem.xml.</literal> (This and all other examples are located in
-the <literal>examples</literal>directory of the installation of the UIMA SDK, which can be imported into an
-Eclipse project for your convenience, as described in
- <olink targetdoc="&uima_docs_overview;" targetptr="ugr.eclipse_setup.example_code"/>.)</para>
-
-<para>In Eclipse, expand the <literal>uimaj_examples</literal> project in the
-Package Explorer view, and browse to the file <literal>descriptors/tutorial/ex1/TutorialTypeSystem.xml</literal>.
- Right-click on the file in the navigator and
-select Open With → Component Descriptor Editor. Once the editor opens, click on the
-<quote>Type System</quote> tab at the bottom of the editor window. You should see a view such as the following:</para>
-
-<screenshot>
+ <para>The UIMA SDK include several other examples you may find interesting,
+ including</para>
+
+ <itemizedlist spacing="compact"><listitem><para>SimpleTokenAndSentenceAnnotator
+ – a simple tokenizer and sentence annotator.</para></listitem>
+
+ <listitem><para>PersonTitleDBWriterCasConsumer – a sample CAS Consumer which
+ populates a relational database with some annotations. It uses JDBC and in this
+ example, hooks up with the Open Source Apache Derby database. </para></listitem>
+ </itemizedlist>
+
+ <para><emphasis role="bolditalic">Additional Topics</emphasis> describes
+ additional features of the UIMA SDK that may help you in building your own annotators and
+ analysis engines.</para>
+
+ <para><emphasis role="bolditalic"><xref linkend="ugr.tug.aae.common_pitfalls"/>
+ </emphasis> contains some useful guidelines to help you ensure that your annotators will
+ work correctly in any UIMA application.</para>
+
+ <para>This guide does not discuss how to build UIMA Applications, which are programs that
+ use Analysis Engines, along with other components, e.g. a search engine, document store,
+ and user interface, to deliver a complete package of functionality to an end-user. For
+ information on application development, see <olink
+ targetdoc="&uima_docs_tutorial_guides;" targetptr="ugr.tug.app_dev"/>
+ .</para>
+
+ <section id="ugr.tug.aae.getting_started">
+ <title>Getting Started</title>
+
+ <para>This section is a step-by-step tutorial that will get you started developing UIMA
+ annotators. All of the files referred to by the examples in this chapter are in the
+ <literal>examples</literal> directory of the UIMA SDK. This directory is designed to
+ be imported into your Eclipse workspace; see <olink
+ targetdoc="&uima_docs_overview;"
+ targetptr="ugr.eclipse_setup.example_code"/> for instructions on how to do
+ this. Also you may wish to refer to the UIMA SDK JavaDocs located in the <ulink
+ url="file:api/index.html">docs/api</ulink> directory.</para>
+ <note><para>In Eclipse 3.1, if you highlight a UIMA class or method defined in the UIMA SDK
+ JavaDocs, you can conveniently have Eclipse open the corresponding JavaDoc for that
+ class or method in a browser, by pressing Shift + F2.</para></note>
+
+ <para>The example annotator that we are going to walk through will detect room numbers for
+ rooms where the room numbering scheme follows some simple conventions. In our example,
+ there are two kinds of patterns we want to find; here are some examples, together with
+ their corresponding regular expression patterns:
+ <variablelist>
+ <varlistentry>
+ <term>Yorktown patterns:</term>
+ <listitem><para>20-001, 31-206, 04-123(Regular Expression Pattern:
+ ##-[0-2]##)</para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>Hawthorne patterns:</term>
+ <listitem><para>GN-K35, 1S-L07, 4N-B21 (Regular Expression Pattern:
+ [G1-4][NS]-[A-Z]##)</para></listitem>
+ </varlistentry>
+ </variablelist> </para>
+
+ <para>There are several steps to develop and test a simple UIMA annotator.</para>
+
+ <orderedlist spacing="compact"><listitem><para>Define the CAS types that the
+ annotator will use.</para></listitem>
+
+ <listitem><para>Generate the Java classes for these types.</para></listitem>
+
+ <listitem><para>Write the actual annotator Java code.</para></listitem>
+
+ <listitem><para>Create the Analysis Engine descriptor.</para></listitem>
+
+ <listitem><para>Test the annotator. </para></listitem></orderedlist>
+
+ <para>These steps are discussed in the next sections.</para>
+
+ <section id="ugr.tug.aae.defining_types">
+ <title>Defining Types</title>
+
+ <para>The first step in developing an annotator is to define the CAS Feature Structure
+ types that it creates. This is done in an XML file called a <emphasis>Type System
+ Descriptor</emphasis>. UIMA defines some basic built-in CAS types such as TOP,
+ Boolean, Byte, Short, Integer, Long, Float, Double, Arrays of primitives and
+ FSArray, and Annotation. TOP is the root of the type system, analogous to Object in
+ Java. FSArray is an array of Feature Structures (i.e. an array of instances of
+ TOP).</para>
+
+ <para>UIMA includes an Eclipse plug-in that will help you edit Type System
+ Descriptors, so if you are using Eclipse you will not need to worry about the details of
+ the XML syntax. See <olink targetdoc="&uima_docs_overview;"
+ targetptr="ugr.eclipse_setup"/> for instructions on setting up Eclipse and
+ installing the plugin.</para>
+
+ <para>The Type System Descriptor for our annotator is located in the file
+ <literal>descriptors/tutorial/ex1/TutorialTypeSystem.xml.</literal> (This
+ and all other examples are located in the <literal>examples</literal>directory of
+ the installation of the UIMA SDK, which can be imported into an Eclipse project for
+ your convenience, as described in <olink targetdoc="&uima_docs_overview;"
+ targetptr="ugr.eclipse_setup.example_code"/>.)</para>
+
+ <para>In Eclipse, expand the <literal>uimaj_examples</literal> project in the
+ Package Explorer view, and browse to the file
+ <literal>descriptors/tutorial/ex1/TutorialTypeSystem.xml</literal>.
+ Right-click on the file in the navigator and select Open With → Component
+ Descriptor Editor. Once the editor opens, click on the <quote>Type System</quote>
+ tab at the bottom of the editor window. You should see a view such as the
+ following:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="575" depth="339" format="JPG" fileref="&imgroot;image002.jpg"/>
@@ -221,34 +221,37 @@
<textobject><phrase>Screenshot of editor for Type System Definitions</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>Our annotator will need only one type – <literal>org.apache.uima.tutorial.RoomNumber</literal>.
- (We use the same namespace conventions as are
-used for Java classes.) Just as in Java,
-types have supertypes. The supertype is
-listed in the second column of the left table.
- In this case our RoomNumber annotation extends from the built-in type <literal>uima.tcas.Annotation</literal>.</para>
-
-<para>Descriptions can be included with types and features. In this example, there is a description
-associated with the <literal>building</literal> feature. To see it, hover the mouse over the feature.</para>
-
-<para>The bottom tab labeled <quote>Source</quote> will show you
-the XML source file associated with this descriptor.</para>
-
-<para>The built-in Annotation type declares two fields (called <emphasis>Features</emphasis>
-in CAS terminology) – begin and end. These features store the character offsets of the span of text to which
-the annotation refers. Our RoomNumber
-type will inherit these features from <literal>uima.tcas.Annotation</literal>,
-its supertype; they are not visible in this view because inherited features are
-not shown. One additional feature, <literal>building</literal>, is declared. It takes a String as its value.
- Instead of String, we could have declared the range-type of our feature
-to be any other CAS type (defined or built-in).</para>
-
-<para>If you are not using Eclipse, if you need to edit the type
-system, do so using any XML or text editor, directly. The following is the actual XML
-representation of the Type System displayed above in the editor:</para>
-
- <programlisting>
+
+ <para>Our annotator will need only one type –
+ <literal>org.apache.uima.tutorial.RoomNumber</literal>. (We use the same
+ namespace conventions as are used for Java classes.) Just as in Java, types have
+ supertypes. The supertype is listed in the second column of the left table. In this
+ case our RoomNumber annotation extends from the built-in type
+ <literal>uima.tcas.Annotation</literal>.</para>
+
+ <para>Descriptions can be included with types and features. In this example, there is a
+ description associated with the <literal>building</literal> feature. To see it,
+ hover the mouse over the feature.</para>
+
+ <para>The bottom tab labeled <quote>Source</quote> will show you the XML source file
+ associated with this descriptor.</para>
+
+ <para>The built-in Annotation type declares two fields (called
+ <emphasis>Features</emphasis> in CAS terminology) – begin and end. These
+ features store the character offsets of the span of text to which the annotation
+ refers. Our RoomNumber type will inherit these features from
+ <literal>uima.tcas.Annotation</literal>, its supertype; they are not visible in
+ this view because inherited features are not shown. One additional feature,
+ <literal>building</literal>, is declared. It takes a String as its value. Instead
+ of String, we could have declared the range-type of our feature to be any other CAS type
+ (defined or built-in).</para>
+
+ <para>If you are not using Eclipse, if you need to edit the type system, do so using any XML
+ or text editor, directly. The following is the actual XML representation of the Type
+ System displayed above in the editor:</para>
+
+
+ <programlisting>
<![CDATA[
<?xml version="1.0" encoding="UTF-8" ?>
<typeSystemDescription xmlns="http://uima.apache.org/resourceSpecifier">
@@ -273,25 +276,25 @@
</typeSystemDescription>
]]>
</programlisting>
-
+
</section>
-
-
- <section id="ugr.tug.aae.generating_jcas_sources">
- <title>Generating Java Source Files for CAS Types</title>
-
-<para>When you save a descriptor that you have modified, the
-Component Descriptor Editor will automatically generate Java classes
-corresponding to the types that are defined in that descriptor (unless this has
-been disabled), using a utility called JCasGen. These Java classes will have the same name (including package) as the
-CAS types, and will have get and set methods for each of the features that you
-have defined.</para>
-
-<para>This feature is enabled/disabled using the UIMA menu
-pulldown (or the Eclipse Preferences → UIMA). If automatic running of JCasGen is not happening, please make sure the
-option is checked:</para>
-
- <screenshot>
+
+ <section id="ugr.tug.aae.generating_jcas_sources">
+ <title>Generating Java Source Files for CAS Types</title>
+
+ <para>When you save a descriptor that you have modified, the Component Descriptor
+ Editor will automatically generate Java classes corresponding to the types that are
+ defined in that descriptor (unless this has been disabled), using a utility called
+ JCasGen. These Java classes will have the same name (including package) as the CAS
+ types, and will have get and set methods for each of the features that you have
+ defined.</para>
+
+ <para>This feature is enabled/disabled using the UIMA menu pulldown (or the Eclipse
+ Preferences → UIMA). If automatic running of JCasGen is not happening, please
+ make sure the option is checked:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="575" depth="83" format="JPG" fileref="&imgroot;image004.jpg"/>
@@ -299,21 +302,20 @@
<textobject><phrase>Screenshot of enabling automatic running of JCasGen</phrase></textobject>
</mediaobject>
</screenshot>
-
-
-<para>The Java class for the example
-org.apache.uima.tutorial.RoomNumber type can be found in <literal>src/org/apache/uima/tutorial/RoomNumber.java</literal>.
- You will see how to use these generated classes in the next section.</para>
-
-<para>If you are not using the Component Descriptor Editor, you
-will need to generate these Java classes by using the <emphasis>JCasGen</emphasis> tool.
- JCasGen reads a Type System Descriptor XML
-file and generates the corresponding Java classes that you can then use in your
-annotator code. To launch JCasGen,
-run the jcasgen shell script located in the <literal>/bin</literal> directory of the
-UIMA SDK installation. This should launch a GUI that looks something like this:</para>
-
-<screenshot>
+
+ <para>The Java class for the example org.apache.uima.tutorial.RoomNumber type can
+ be found in <literal>src/org/apache/uima/tutorial/RoomNumber.java</literal>
+ . You will see how to use these generated classes in the next section.</para>
+
+ <para>If you are not using the Component Descriptor Editor, you will need to generate
+ these Java classes by using the <emphasis>JCasGen</emphasis> tool. JCasGen reads a
+ Type System Descriptor XML file and generates the corresponding Java classes that
+ you can then use in your annotator code. To launch JCasGen, run the jcasgen shell
+ script located in the <literal>/bin</literal> directory of the UIMA SDK
+ installation. This should launch a GUI that looks something like this:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="534" depth="279" format="JPG" fileref="&imgroot;image006.jpg"/>
@@ -321,86 +323,76 @@
<textobject><phrase>Screenshot of JCasGen</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>Use the <quote>Browse</quote> buttons to select your input
-file (TutorialTypeSystem.xml) and output directory (the root of the source tree
-into which you want the generated files placed). Then click the <quote>Go</quote> button.
-If the Type System
-Descriptor has no errors, new Java source files will be generated under the specified
-output directory.</para>
-
-<para>There are some additional options to choose from when
-running JCasGen; please refer to the
- <olink targetdoc="&uima_docs_tools;" targetptr="ugr.tools.jcasgen"/> for details.</para>
-</section>
-
-<section id="ugr.tug.aae.developing_annotator_code">
- <title>Developing Your Annotator Code</title>
-
-
-<para>Annotator implementations all implement a standard
-interface (AnalysisComponent), having several methods, the most important of which are:
-
-<itemizedlist spacing="compact"><listitem><para><literal>initialize</literal>,
-</para></listitem>
-
-<listitem><para><literal>process</literal>,
-and </para></listitem>
-
-<listitem><para><literal>destroy</literal>.
-</para></listitem></itemizedlist></para>
-
-<para><literal>initialize</literal> is called by the
-framework once when it first creates an instance of the annotator class.
- <literal>process</literal> is called
-once per item being processed. <literal>destroy</literal> may be called by the application when it is done.
-There is a default implementation of this interface for annotators using the JCas,
-called JCasAnnotator_ImplBase, which has implementations of all required
-methods except for the process method.</para>
-
-<para>Our annotator class extends the JCasAnnotator_ImplBase;
-most annotators that use the JCas will extend from this class, so they only
-have to implement the process method. This class is not
-restricted to handling just text; see
- <xref linkend="ugr.tug.annotations_artifacts_sofas"/>.</para>
-
-<para>Annotators are not required to extend from the
-JCasAnnotator_ImplBase class; they may instead directly implement the
-AnalysisComponent interface, and provide all method implementations
-themselves.
- <footnote>
- <para>Note that AnalysisComponent is not specific to JCAS. There is a
-method getRequiredCasInterface() which the user would have to
-implement to return <literal>JCas.class</literal>. Then in the
- <literal>process(AbstractCas cas)</literal>
-method, they would need to typecas <literal>cas</literal> to type
- <literal>JCas</literal>.</para></footnote>
- This allows you to have your
-annotator inherit from some other superclass if necessary. If you would like to
-do this, see the JavaDocs for JCasAnnotator for descriptions of the methods
-you must implement.</para>
-
-<para>Annotator classes need to be public and have public,
-0-argument constructors, so that they can be instantiated by the framework
- <footnote><para>
-Although Java classes in which you do not define any constructor will, by
-default, have a 0-argument constructor that doesn't do anything, a class in
-which you have defined at least one constructor does not get a default
-0-argument constructor.</para>
- </footnote>.</para>
-
-<para>The class definition for our RoomNumberAnnotator
-implements the process method, and is shown here.
- You can find the source for this in the
- <literal>uimaj_examples/src/org/apache/uima/tutorial/ex1/RoomNumberAnnotator.java</literal>.
- <note><para>In Eclipse, in the <quote>Package Explorer</quote> view,
- this will appear by default in the project <literal>uimaj_examples</literal>,
- in the folder <literal>src</literal>,
-in the package <literal>org.apache.uima.tutorial.ex1</literal>.</para></note>
-In Eclipse, open the RoomNumberAnnotator.java
-in the uimaj_examples project, under the src directory.</para>
-
-<programlisting>
+
+ <para>Use the <quote>Browse</quote> buttons to select your input file
+ (TutorialTypeSystem.xml) and output directory (the root of the source tree into
+ which you want the generated files placed). Then click the <quote>Go</quote>
+ button. If the Type System Descriptor has no errors, new Java source files will be
+ generated under the specified output directory.</para>
+
+ <para>There are some additional options to choose from when running JCasGen; please
+ refer to the <olink targetdoc="&uima_docs_tools;"
+ targetptr="ugr.tools.jcasgen"/> for details.</para>
+ </section>
+
+ <section id="ugr.tug.aae.developing_annotator_code">
+ <title>Developing Your Annotator Code</title>
+
+ <para>Annotator implementations all implement a standard interface
+ (AnalysisComponent), having several methods, the most important of which are:
+
+ <itemizedlist spacing="compact">
+ <listitem><para><literal>initialize</literal>, </para></listitem>
+
+ <listitem><para><literal>process</literal>, and </para></listitem>
+
+ <listitem><para><literal>destroy</literal>. </para></listitem>
+ </itemizedlist></para>
+
+ <para><literal>initialize</literal> is called by the framework once when it first
+ creates an instance of the annotator class. <literal>process</literal> is called
+ once per item being processed. <literal>destroy</literal> may be called by the
+ application when it is done. There is a default implementation of this interface for
+ annotators using the JCas, called JCasAnnotator_ImplBase, which has
+ implementations of all required methods except for the process method.</para>
+
+ <para>Our annotator class extends the JCasAnnotator_ImplBase; most annotators that
+ use the JCas will extend from this class, so they only have to implement the process
+ method. This class is not restricted to handling just text; see <olink
+ targetdoc="&uima_docs_tutorial_guides;"
+ targetptr="ugr.tug.annotations_artifacts_sofas"/>.</para>
+
+ <para>Annotators are not required to extend from the JCasAnnotator_ImplBase class;
+ they may instead directly implement the AnalysisComponent interface, and provide
+ all method implementations themselves. <footnote>
+ <para>Note that AnalysisComponent is not specific to JCAS. There is a method
+ getRequiredCasInterface() which the user would have to implement to return
+ <literal>JCas.class</literal>. Then in the <literal>process(AbstractCas
+ cas)</literal> method, they would need to typecas <literal>cas</literal> to
+ type <literal>JCas</literal>.</para></footnote> This allows you to have your
+ annotator inherit from some other superclass if necessary. If you would like to do
+ this, see the JavaDocs for JCasAnnotator for descriptions of the methods you must
+ implement.</para>
+
+ <para>Annotator classes need to be public and have public, 0-argument constructors,
+ so that they can be instantiated by the framework <footnote><para> Although Java
+ classes in which you do not define any constructor will, by default, have a 0-argument
+ constructor that doesn't do anything, a class in which you have defined at least
+ one constructor does not get a default 0-argument constructor.</para> </footnote>
+ .</para>
+
+ <para>The class definition for our RoomNumberAnnotator implements the process
+ method, and is shown here. You can find the source for this in the
+ <literal>uimaj_examples/src/org/apache/uima/tutorial/ex1/RoomNumberAnnotator.java</literal>
+ . <note><para>In Eclipse, in the <quote>Package Explorer</quote> view, this will
+ appear by default in the project <literal>uimaj_examples</literal>, in the folder
+ <literal>src</literal>, in the package
+ <literal>org.apache.uima.tutorial.ex1</literal>.</para></note> In Eclipse,
+ open the RoomNumberAnnotator.java in the uimaj_examples project, under the src
+ directory.</para>
+
+
+ <programlisting>
package org.apache.uima.tutorial.ex1;
import java.util.regex.Matcher;
@@ -425,29 +417,28 @@
// Discussed Later
}
}</programlisting>
-
-<para>The two Java class fields, mYorktownPattern and mHawthornePattern,
-hold regular expressions that will be used in the process method.
- Note that these two fields are part of the
-Java implementation of the annotator code, and not a part of the CAS type
-system. We are using the regular expression facility that is built into Java
-1.4. It is not critical that you know
-the details of how this works, but if you are curious the details can be found
-in the Java API docs for the java.util.regex package.</para>
-
-<para>The only method that we are required to implement is
-process. This method is typically called
-once for each document that is being analyzed.
- This method takes one argument, which is a JCas instance; this holds the
- document to be analyzed and all of the analysis
-results.
- <footnote><para>Version 1 of UIMA specified an additional parameter, the ResultSpecification.
- This provides a specification of which types and features are desired to be computed and
- "output" from this annotator. Its use is optional; many annotators ignore it.</para><para>
- This parameter has been replaced by specific set/getResultSpecification() methods, which
- allow the annotator to receive a signal (a method call) when the result specification changes.</para></footnote></para>
-
-<programlisting>
+
+ <para>The two Java class fields, mYorktownPattern and mHawthornePattern, hold
+ regular expressions that will be used in the process method. Note that these two
+ fields are part of the Java implementation of the annotator code, and not a part of the
+ CAS type system. We are using the regular expression facility that is built into Java
+ 1.4. It is not critical that you know the details of how this works, but if you are
+ curious the details can be found in the Java API docs for the java.util.regex
+ package.</para>
+
+ <para>The only method that we are required to implement is process. This method is
+ typically called once for each document that is being analyzed. This method takes one
+ argument, which is a JCas instance; this holds the document to be analyzed and all of
+ the analysis results. <footnote><para>Version 1 of UIMA specified an additional
+ parameter, the ResultSpecification. This provides a specification of which types
+ and features are desired to be computed and "output" from this annotator. Its use is
+ optional; many annotators ignore it.</para><para> This parameter has been
+ replaced by specific set/getResultSpecification() methods, which allow the
+ annotator to receive a signal (a method call) when the result specification
+ changes.</para></footnote></para>
+
+
+ <programlisting>
public void process(JCas aJCas) {
// get document text
String docText = aJCas.getDocumentText();
@@ -477,91 +468,81 @@
}
}
</programlisting>
-
-<para>The Matcher class is part of the java.util.regex package
-and is used to find the room numbers in the document text. When we find one, recording the annotation is
-as simple as creating a new Java object and calling some set methods:</para>
-
- <programlisting>
+
+ <para>The Matcher class is part of the java.util.regex package and is used to find the
+ room numbers in the document text. When we find one, recording the annotation is as
+ simple as creating a new Java object and calling some set methods:</para>
+
+
+ <programlisting>
RoomNumber annotation = new RoomNumber(aJCas);
annotation.setBegin(matcher.start());
annotation.setEnd(matcher.end());
annotation.setBuilding("Yorktown");
</programlisting>
-
-<para>The <literal>RoomNumber</literal> class was generated from the type system
-description by the Component Descriptor Editor or the JCasGen tool, as
-discussed in the previous section.</para>
-
-<para>Finally, we call annotation.addToIndexes() to add the new
-annotation to the indexes maintained in the CAS. By default, the CAS implementation used for
-analysis of text documents keeps an index of all annotations in their order
-from beginning to end of the document. Subsequent annotators or applications use the indexes to iterate over
-the annotations. It is also possible to
-define your own custom indexes in the CAS (see
- <olink targetdoc="&uima_docs_ref;" targetptr="ugr.ref.cas"/>
- for details).</para>
-
-<note><para>
- If you don't add the instance
-to the indexes, it cannot be retrieved by down-stream annotators, using the
-indexes.
-</para></note>
-
-<para>We're almost ready to test the RoomNumberAnnotator. There is just one more step remaining.</para>
-</section>
- <section id="ugr.tug.aae.creating_xml_descriptor">
- <title>Creating the XML Descriptor</title>
-
-<para>The UIMA architecture requires that descriptive
-information about an annotator be represented in an XML file and provided along
-with the annotator class file(s) to the UIMA framework at run time.
- This XML file is called an <emphasis>Analysis Engine Descriptor</emphasis>.
- The descriptor includes:
-
-<itemizedlist><listitem><para>Name, description, version, and
-vendor</para></listitem>
-
-<listitem><para>The annotator's inputs and outputs,
-defined in terms of the types in a Type System Descriptor</para></listitem>
-
-<listitem><para>Declaration of the configuration
-parameters that the annotator accepts
-</para></listitem></itemizedlist>
-</para>
-
- <para>The <emphasis>Component Descriptor Editor</emphasis> plugin, which we
-previously used to edit the Type System descriptor, can also be used to edit
-Analysis Engine Descriptors.</para>
-
-<para>A descriptor for our RoomNumberAnnotator is provided with
-the UIMA distribution under the name
- <literal>descriptors/tutorial/ex1/RoomNumberAnnotator.xml.</literal> To
-edit it in Eclipse, right-click on that file in the navigator and select Open
-With → Component Descriptor Editor.</para>
-
-<tip><para>In Eclipse, you can double click
-on the tab at the top of the Component Descriptor Editor's window identifying
-the currently selected editor, and the window will
- <quote>Maximize</quote>. Double click it again to restore the original
-size.</para></tip>
-
-<para>If you are not using Eclipse, you will need to edit Analysis
-Engine descriptors manually. See
- <xref linkend="ugr.tug.aae.ae_descriptor_syntax_intro"/>
-for an introduction to the Analysis Engine descriptor
-XML syntax. The remainder of this
-section assumes you are using the Component Descriptor Editor plug-in to edit
-the Analysis Engine descriptor.</para>
-
-<para>The Component Descriptor Editor consists of several tabbed
-pages; we will only need to use a few of them here. For more information on using this editor,
-see <olink targetdoc="&uima_docs_tools;" targetptr="ugr.tools.cde"/>.</para>
-
-<para>The initial page of the Component Descriptor Editor is the
-Overview page, which appears as follows:</para>
-
-<screenshot>
+
+ <para>The <literal>RoomNumber</literal> class was generated from the type system
+ description by the Component Descriptor Editor or the JCasGen tool, as discussed in
+ the previous section.</para>
+
+ <para>Finally, we call annotation.addToIndexes() to add the new annotation to the
+ indexes maintained in the CAS. By default, the CAS implementation used for analysis
+ of text documents keeps an index of all annotations in their order from beginning to
+ end of the document. Subsequent annotators or applications use the indexes to
+ iterate over the annotations. It is also possible to define your own custom indexes in
+ the CAS (see <olink targetdoc="&uima_docs_ref;" targetptr="ugr.ref.cas"/> for
+ details).</para> <note><para> If you don't add the instance to the indexes, it
+ cannot be retrieved by down-stream annotators, using the indexes. </para></note>
+
+ <para>We're almost ready to test the RoomNumberAnnotator. There is just one more
+ step remaining.</para>
+ </section>
+ <section id="ugr.tug.aae.creating_xml_descriptor">
+ <title>Creating the XML Descriptor</title>
+
+ <para>The UIMA architecture requires that descriptive information about an
+ annotator be represented in an XML file and provided along with the annotator class
+ file(s) to the UIMA framework at run time. This XML file is called an
+ <emphasis>Analysis Engine Descriptor</emphasis>. The descriptor includes:
+
+ <itemizedlist><listitem><para>Name, description, version, and vendor</para>
+ </listitem>
+
+ <listitem><para>The annotator's inputs and outputs, defined in terms of
+ the types in a Type System Descriptor</para></listitem>
+
+ <listitem><para>Declaration of the configuration parameters that the
+ annotator accepts </para></listitem></itemizedlist> </para>
+
+ <para>The <emphasis>Component Descriptor Editor</emphasis> plugin, which we
+ previously used to edit the Type System descriptor, can also be used to edit Analysis
+ Engine Descriptors.</para>
+
+ <para>A descriptor for our RoomNumberAnnotator is provided with the UIMA
+ distribution under the name
+ <literal>descriptors/tutorial/ex1/RoomNumberAnnotator.xml.</literal> To
+ edit it in Eclipse, right-click on that file in the navigator and select Open With
+ → Component Descriptor Editor.</para> <tip><para>In Eclipse, you can double
+ click on the tab at the top of the Component Descriptor Editor's window
+ identifying the currently selected editor, and the window will
+ <quote>Maximize</quote>. Double click it again to restore the original size.</para>
+ </tip>
+
+ <para>If you are not using Eclipse, you will need to edit Analysis Engine descriptors
+ manually. See <xref linkend="ugr.tug.aae.xml_intro_ae_descriptor"/> for an
+ introduction to the Analysis Engine descriptor XML syntax. The remainder of this
+ section assumes you are using the Component Descriptor Editor plug-in to edit the
+ Analysis Engine descriptor.</para>
+
+ <para>The Component Descriptor Editor consists of several tabbed pages; we will only
+ need to use a few of them here. For more information on using this editor, see <olink
+ targetdoc="&uima_docs_tools;" targetptr="ugr.tools.cde"/>.</para>
+
+ <para>The initial page of the Component Descriptor Editor is the Overview page, which
+ appears as follows:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="575" depth="313" format="JPG" fileref="&imgroot;image008.jpg"/>
@@ -570,29 +551,27 @@
</textobject>
</mediaobject>
</screenshot>
-
-
-<para>This presents an overview of the RoomNumberAnnotator Analysis
-Engine (AE). The left side of the page
-shows that this descriptor is for a <emphasis>Primitive</emphasis> AE (meaning it consists of
-a single annotator), and that the annotator code is developed in Java.
- Also, it specifies the Java class that
-implements our logic (the code which was discussed in the previous
-section). Finally, on the right side of
-the page are listed some descriptive attributes of our annotator.</para>
-
-<para>The other two pages that need to be filled out are the
-Type System page and the Capabilities page. You can switch to these pages using the tabs at the bottom of the
-Component Descriptor Editor. In the
-tutorial, these are already filled out for you.</para>
-
-<para>The RoomNumberAnnotator will be using the
-TutorialTypeSystem we looked at in Section
- <xref linkend="ugr.tug.aae.defining_types"/>. To
-specify this, we add this type system to the Analysis Engine's list of Imported
-Type Systems, using the Type System page's right side panel, as shown here:</para>
-
- <screenshot>
+
+ <para>This presents an overview of the RoomNumberAnnotator Analysis Engine (AE). The
+ left side of the page shows that this descriptor is for a
+ <emphasis>Primitive</emphasis> AE (meaning it consists of a single annotator),
+ and that the annotator code is developed in Java. Also, it specifies the Java class
+ that implements our logic (the code which was discussed in the previous section).
+ Finally, on the right side of the page are listed some descriptive attributes of our
+ annotator.</para>
+
+ <para>The other two pages that need to be filled out are the Type System page and the
+ Capabilities page. You can switch to these pages using the tabs at the bottom of the
+ Component Descriptor Editor. In the tutorial, these are already filled out for
+ you.</para>
+
+ <para>The RoomNumberAnnotator will be using the TutorialTypeSystem we looked at in
+ Section <xref linkend="ugr.tug.aae.defining_types"/>. To specify this, we add
+ this type system to the Analysis Engine's list of Imported Type Systems, using
+ the Type System page's right side panel, as shown here:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="576" depth="257" format="JPG" fileref="&imgroot;image010.jpg"/>
@@ -600,11 +579,12 @@
<textobject><phrase>Screenshot of CDE Type System page</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>On the Capabilities page, we define our annotator's inputs
-and outputs, in terms of the types in the type system. The Capabilities page is shown below:</para>
-
- <screenshot>
+
+ <para>On the Capabilities page, we define our annotator's inputs and outputs, in
+ terms of the types in the type system. The Capabilities page is shown below:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="511" depth="398" format="JPG" fileref="&imgroot;image012.jpg"/>
@@ -612,50 +592,43 @@
<textobject><phrase>Screenshot of CDE Capabilities page</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>Although capabilities come in sets, having multiple sets is deprecated; here we're just using one
-set. The RoomNumberAnnotator is very
-simple. It requires no input types, as
-it operates directly on the document text -- which is supplied as a part of the
-CAS initialization (and which is always assumed to be present). It produces only one output type
-(RoomNumber), and it sets the value of the <literal>building</literal> feature on that type.
- This is all represented on the Capabilities page.</para>
-
-<para>The Capabilities page has two other parts for specifying
-languages and Sofas. The languages
-section allows you to specify which languages your Analysis Engine
-supports. The RoomNumberAnnotator
-happens to be language-independent, so we can leave this blank.
- The Sofas section allows you to specify the
-names of additional subjects of analysis.
- This capability and the Sofa Mappings at the bottom are advanced topics,
-described in
- <xref linkend="ugr.tug.annotations_artifacts_sofas"/>. </para>
-
-<para>This is all of the information we need to provide for a
-simple annotator. If you want to peek at
-the XML that this tool saves you from having to write, click on the
-<quote>Source</quote> tab at the bottom to view the generated XML.</para>
-</section>
-
+
+ <para>Although capabilities come in sets, having multiple sets is deprecated; here
+ we're just using one set. The RoomNumberAnnotator is very simple. It requires
+ no input types, as it operates directly on the document text -- which is supplied as a
+ part of the CAS initialization (and which is always assumed to be present). It
+ produces only one output type (RoomNumber), and it sets the value of the
+ <literal>building</literal> feature on that type. This is all represented on the
+ Capabilities page.</para>
+
+ <para>The Capabilities page has two other parts for specifying languages and Sofas.
+ The languages section allows you to specify which languages your Analysis Engine
+ supports. The RoomNumberAnnotator happens to be language-independent, so we can
+ leave this blank. The Sofas section allows you to specify the names of additional
+ subjects of analysis. This capability and the Sofa Mappings at the bottom are
+ advanced topics, described in <olink targetdoc="&uima_docs_tutorial_guides;"
+ targetptr="ugr.tug.annotations_artifacts_sofas"/>. </para>
+
+ <para>This is all of the information we need to provide for a simple annotator. If you
+ want to peek at the XML that this tool saves you from having to write, click on the
+ <quote>Source</quote> tab at the bottom to view the generated XML.</para>
+ </section>
+
<section id="ugr.tug.aae.testing_your_annotator">
- <title>Testing Your Annotator</title>
-
-
-
-<para>Having developed an annotator, we need a way to try it out
-on some example documents. The UIMA SDK
-includes a tool called the Document Analyzer that will allow us to do
-this. To run the Document Analyzer,
-execute the documentAnalyzer shell script that is in the <literal>bin</literal> directory of your
-UIMA SDK installation, or, if you are using the example Eclipse project,
-execute the <quote>UIMA Document Analyzer</quote> run configuration supplied with
-that project. (To do this, click on the
-menu bar Run → Run ... → and under Java Applications in the left box,
-click on UIMA Document Analyzer.)</para>
-
-<para>You should see a screen that looks like this:</para>
-
+ <title>Testing Your Annotator</title>
+
+ <para>Having developed an annotator, we need a way to try it out on some example
+ documents. The UIMA SDK includes a tool called the Document Analyzer that will allow
+ us to do this. To run the Document Analyzer, execute the documentAnalyzer shell
+ script that is in the <literal>bin</literal> directory of your UIMA SDK
+ installation, or, if you are using the example Eclipse project, execute the
+ <quote>UIMA Document Analyzer</quote> run configuration supplied with that
+ project. (To do this, click on the menu bar Run → Run ... → and under Java
+ Applications in the left box, click on UIMA Document Analyzer.)</para>
+
+ <para>You should see a screen that looks like this:</para>
+
+
<screenshot>
<mediaobject>
<imageobject>
@@ -664,40 +637,40 @@
<textobject><phrase>Screenshot of UIMA Document Analyzer GUI</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>There are six options on this screen:</para>
-
-<orderedlist><listitem><para>Directory containing documents to
-analyze</para></listitem>
-
-<listitem><para>Directory where analysis results
-will be written</para></listitem>
-
-<listitem><para>The XML descriptor for the Analysis
-Engine (TAE) you want to run</para></listitem>
-
-<listitem><para>(Optional) an XML tag, within the
-input documents, that contains the text to be analyzed. For example, the value TEXT would cause the
-TAE to only analyze the portion of the document enclosed within <TEXT>...</TEXT>
-tags.</para></listitem>
-
-<listitem><para>Language of the document </para></listitem>
-
-<listitem><para>Character encoding
-</para></listitem></orderedlist>
-
-<para>Use the Browse button next to the third item to
-set the <quote>Location of TAE XML Descriptor</quote> field to the descriptor
-we've just been discussing —
- <literal>uima/docs/examples/descriptors/tutorial/ex1/RoomNumberAnnotator.xml</literal>.
- Set the other fields to the values shown in
-the screen shot above (which should be the default values if this is the first
-time you've run the Document Analyzer). Then click the <quote>Run</quote> button to start processing.</para>
-
-<para>When processing completes, an <quote>Analysis Results</quote>
-window should appear.</para>
-
- <screenshot>
+
+ <para>There are six options on this screen:</para>
+
+ <orderedlist><listitem><para>Directory containing documents to analyze</para>
+ </listitem>
+
+ <listitem><para>Directory where analysis results will be written</para>
+ </listitem>
+
+ <listitem><para>The XML descriptor for the Analysis Engine (AE) you want to
+ run</para></listitem>
+
+ <listitem><para>(Optional) an XML tag, within the input documents, that contains
+ the text to be analyzed. For example, the value TEXT would cause the AE to only
+ analyze the portion of the document enclosed within
+ <TEXT>...</TEXT> tags.</para></listitem>
+
+ <listitem><para>Language of the document </para></listitem>
+
+ <listitem><para>Character encoding </para></listitem></orderedlist>
+
+ <para>Use the Browse button next to the third item to set the <quote>Location of AE XML
+ Descriptor</quote> field to the descriptor we've just been discussing
+ —
+ <literal><where-you-installed-uima-e.g.UIMA_HOME>/examples/descriptors/tutorial/ex1/RoomNumberAnnotator.xml</literal>
+ . Set the other fields to the values shown in the screen shot above (which should be the
+ default values if this is the first time you've run the Document Analyzer). Then
+ click the <quote>Run</quote> button to start processing.</para>
+
+ <para>When processing completes, an <quote>Analysis Results</quote> window should
+ appear.</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="332" depth="255" format="JPG" fileref="&imgroot;image016.jpg"/>
@@ -706,11 +679,13 @@
</mediaobject>
</screenshot>
-<para>Make sure <quote>Java Viewer</quote> is selected as the
-Results Display Format, and <emphasis role="bold">double-click</emphasis> on the document
-UIMASummerSchool2003.txt to view the annotations that were discovered. The view should look something like this:</para>
-
- <screenshot>
+ <para>Make sure <quote>Java Viewer</quote> is selected as the Results Display
+ Format, and <emphasis role="bold">double-click</emphasis> on the document
+ UIMASummerSchool2003.txt to view the annotations that were discovered. The view
+ should look something like this:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="510" depth="389" format="JPG" fileref="&imgroot;image018.jpg"/>
@@ -718,56 +693,51 @@
<textobject><phrase>Screenshot of UIMA CAS Annotation Viewer GUI</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>You can click the mouse on one of the highlighted
-annotations to see a list of all its features in the frame on the right.</para>
-
-<note><para>The legend will only show
-those types which have at least one instance in the CAS, and are declared as
-outputs in the capabilities section of the descriptor (see
- <xref linkend="ugr.tug.aae.creating_xml_descriptor"/>.
-</para></note>
-
-<para>You can use the DocumentAnalyzer to test any UIMA annotator
-— just make sure that the annotator's classes are in the class path.</para>
-</section>
+
+ <para>You can click the mouse on one of the highlighted annotations to see a list of all
+ its features in the frame on the right.</para> <note><para>The legend will only show
+ those types which have at least one instance in the CAS, and are declared as outputs in the
+ capabilities section of the descriptor (see <xref
+ linkend="ugr.tug.aae.creating_xml_descriptor"/>. </para></note>
+
+ <para>You can use the DocumentAnalyzer to test any UIMA annotator
+ — just make sure that the annotator's classes are in the class
+ path.</para>
+ </section>
</section>
-
-<section>
- <title>Configuration and Logging</title>
-
-<section>
-<title>Configuration Parameters</title>
-
-<para>The example
-RoomNumberAnnotator from the previous section used hardcoded regular
-expressions and location names, which is obviously not very flexible.
- For example, you might want to have the patterns of room numbers be
- supplied by a configuration parameter, rather than having to redo the
- annotator's Java code to add additional patterns.
- Rather than add a new hardcoded regular
-expression for a new pattern, a better solution is to use configuration parameters.</para>
-
-<para>UIMA allows annotators
-to declare configuration parameters in their descriptors. The descriptor also specifies default values
-for the parameters, though these can be overridden at runtime.</para>
-
- <section id="ugr.tug.aae.declaring_parameters_in_the_descriptor">
- <title>Declaring Parameters in the Descriptor</title>
-
-<para>The example
-descriptor <literal>descriptors/tutorial/ex2/RoomNumberAnnotator.xml</literal>
-is the same as the descriptor from the previous section except that information
-has been filled in for the Parameters and Parameter Settings pages of the
-Component Descriptor Editor.</para>
-
-<para>First, in Eclipse,
-open example two's RoomNumberAnnotator in the Component Descriptor Editor, and
-then go to the Parameters page (click on the parameters tab at the bottom of
-the window), which is shown below:</para>
-
- <screenshot>
+ <section>
+ <title>Configuration and Logging</title>
+
+ <section>
+ <title>Configuration Parameters</title>
+
+ <para>The example RoomNumberAnnotator from the previous section used hardcoded
+ regular expressions and location names, which is obviously not very flexible. For
+ example, you might want to have the patterns of room numbers be supplied by a
+ configuration parameter, rather than having to redo the annotator's Java code
+ to add additional patterns. Rather than add a new hardcoded regular expression for a
+ new pattern, a better solution is to use configuration parameters.</para>
+
+ <para>UIMA allows annotators to declare configuration parameters in their
+ descriptors. The descriptor also specifies default values for the parameters,
+ though these can be overridden at runtime.</para>
+
+ <section id="ugr.tug.aae.declaring_parameters_in_the_descriptor">
+ <title>Declaring Parameters in the Descriptor</title>
+
+ <para>The example descriptor
+ <literal>descriptors/tutorial/ex2/RoomNumberAnnotator.xml</literal> is
+ the same as the descriptor from the previous section except that information has
+ been filled in for the Parameters and Parameter Settings pages of the Component
+ Descriptor Editor.</para>
+
+ <para>First, in Eclipse, open example two's RoomNumberAnnotator in the
+ Component Descriptor Editor, and then go to the Parameters page (click on the
+ parameters tab at the bottom of the window), which is shown below:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="538" depth="364" format="JPG" fileref="&imgroot;image020.jpg"/>
@@ -775,42 +745,37 @@
<textobject><phrase>Screenshot of UIMA Component Descriptor Editor (CDE) Parameters page</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>Two parameters –
-Patterns and Locations -- have been declared. In this screen shot, the mouse (not shown) is
- hovering over Patterns to
-show its description in the small popup window.
- Every parameter has the following information associated with it:</para>
-
-<itemizedlist><listitem><para>name – the name by which the annotator code refers to the
-parameter</para></listitem>
-
-
-<listitem><para>description – a natural language description of the
-intent of the parameter</para></listitem>
-
-
-<listitem><para>type – the data type of the parameter's value – must be
-one of String, Integer,
-Float, or Boolean.</para></listitem>
-
-
-<listitem><para>multiValued – true if the parameter
-can take multiple-values (an array), false if the parameter takes only a single
-value. Shown above as <literal>Multi</literal>.</para></listitem>
-
-
-<listitem><para>mandatory – true if a value must be
-provided for the parameter. Shown above as <literal>Req</literal> (for required).
-</para></listitem></itemizedlist>
-
-<para>Both of our
-parameters are mandatory and accept an array of Strings as their value.</para>
-
-<para>Next, default
-values are assigned to the parameters on the Parameter Settings page:</para>
-
- <screenshot>
+
+ <para>Two parameters – Patterns and Locations -- have been declared. In this
+ screen shot, the mouse (not shown) is hovering over Patterns to show its
+ description in the small popup window. Every parameter has the following
+ information associated with it:</para>
+
+ <itemizedlist><listitem><para>name – the name by which the annotator code
+ refers to the parameter</para></listitem>
+
+ <listitem><para>description – a natural language description of the
+ intent of the parameter</para></listitem>
+
+ <listitem><para>type – the data type of the parameter's value
+ – must be one of String, Integer, Float, or Boolean.</para></listitem>
+
+ <listitem><para>multiValued – true if the parameter can take
+ multiple-values (an array), false if the parameter takes only a single value.
+ Shown above as <literal>Multi</literal>.</para></listitem>
+
+ <listitem><para>mandatory – true if a value must be provided for the
+ parameter. Shown above as <literal>Req</literal> (for required). </para>
+ </listitem></itemizedlist>
+
+ <para>Both of our parameters are mandatory and accept an array of Strings as their
+ value.</para>
+
+ <para>Next, default values are assigned to the parameters on the Parameter Settings
+ page:</para>
+
+
+ <screenshot>
<mediaobject>
<imageobject>
<imagedata width="538" depth="364" format="JPG" fileref="&imgroot;image022.jpg"/>
@@ -818,26 +783,28 @@
<textobject><phrase>Screenshot of UIMA Component Descriptor Editor (CDE) Parameter Settings page</phrase></textobject>
</mediaobject>
</screenshot>
-
-<para>Here the
-<quote>Patterns</quote> parameter is selected, and the right pane shows the list
-of values for this parameter, in this case the regular expressions that match
-particular room numbering conventions.
- Notice the third pattern is new, for matching the style of room numbers
-in the third building, which has room numbers such as <literal>J2-A11</literal>.</para>
-</section>
- <section id="ugr.tug.aae.accessing_parameter_values_from_annotator">
- <title>Accessing Parameter Values from the Annotator Code</title>
-
-<para>The class <literal>org.apache.uima.tutorial.ex2.RoomNumberAnnotator</literal> has overridden
-the initialize method. The initialize
-method is called by the UIMA framework when the annotator is instantiated, so
-it is a good place to read configuration parameter values. The default initialize method does nothing
-with configuration parameters, so you have to override it. To see the code in Eclipse, switch to the src
-folder, and open <literal>org.apache.uima.tutorial.ex2</literal>. Here is the method body:</para>
-
-
-<programlisting>
+
+ <para>Here the <quote>Patterns</quote> parameter is selected, and the right pane
+ shows the list of values for this parameter, in this case the regular expressions
+ that match particular room numbering conventions. Notice the third pattern is
+ new, for matching the style of room numbers in the third building, which has room
+ numbers such as <literal>J2-A11</literal>.</para>
+ </section>
+ <section id="ugr.tug.aae.accessing_parameter_values_from_annotator">
+ <title>Accessing Parameter Values from the Annotator Code</title>
+
+ <para>The class
+ <literal>org.apache.uima.tutorial.ex2.RoomNumberAnnotator</literal> has
+ overridden the initialize method. The initialize method is called by the UIMA
+ framework when the annotator is instantiated, so it is a good place to read
+ configuration parameter values. The default initialize method does nothing with
+ configuration parameters, so you have to override it. To see the code in Eclipse,
+ switch to the src folder, and open
+ <literal>org.apache.uima.tutorial.ex2</literal>. Here is the method
+ body:</para>
+
+
+ <programlisting>
/**
* @see AnalysisComponent#initialize(UimaContext)
*/
@@ -855,333 +822,309 @@
}
}
</programlisting>
-
-<para>Configuration parameter
-values are accessed through the UimaContext. As you will see in subsequent sections of
-this chapter, the UimaContext is the annotator's access point for all of
-the facilities provided by the UIMA framework – for example logging and
-external resource access.</para>
-
-<para>The
-UimaContext's <literal>getConfigParameterValue</literal> method takes the name of the parameter
-as an argument; this must match one of the parameters declared in the
-descriptor. The return value of this
-method is a Java Object, whose type corresponds to the declared type of the parameter.
- It is up to the annotator to cast it to the appropriate
-type, String[] in this case.</para>
-
-<para>If there is a
-problem retrieving the parameter values, the framework throws an
-exception. Generally annotators don%apos;t handle these, and just let them
- propagate up.</para>
-
-<para>To see the
-configuration parameters working, run the Document Analyzer application and
-select the descriptor <literal>docs/examples/descriptors/tutorial/ex2/RoomNumberAnnotator.xml</literal>.
- In the example document <literal>WatsonConferenceRooms.txt</literal>,
-you should see some examples of Hawthorne II room numbers that would not have
-been detected by the ex1 version of RoomNumberAnnotator.</para>
-</section>
-
- <section id="ugr.tug.aae.supporting_reconfiguration">
- <title>Supporting Reconfiguration</title>
-
-<para>If you take a look
-at the JavaDocs (located in the
- <ulink url="api/index.html">docs/api</ulink> directory) for
- <literal>org.apache.uima.analysis_component.AnaysisComponent</literal>
-(which our annotator implements indirectly through JCasAnnotator_ImplBase),
-you will see that there is a reconfigure() method, which is called by the
-containing application through the UIMA framework, if the configuration
-parameter values are changed.</para>
-
-<para>The
-AnalysisComponent_ImplBase class provides a default implementation that just calls
-the annotator's destroy method followed by its initialize method.
- This works fine for our annotator. The only situation in which you might want to
-override the default reconfigure() is if your annotator has very expensive
-initialization logic, and you don't want to reinitialize everything if just one
-configuration parameter has changed. In
-that case, you can provide a more intelligent implementation of reconfigure()
-for your annotator.</para>
-
+
+ <para>Configuration parameter values are accessed through the UimaContext. As you
+ will see in subsequent sections of this chapter, the UimaContext is the
+ annotator's access point for all of the facilities provided by the UIMA
+ framework – for example logging and external resource access.</para>
+
+ <para>The UimaContext's <literal>getConfigParameterValue</literal>
+ method takes the name of the parameter as an argument; this must match one of the
+ parameters declared in the descriptor. The return value of this method is a Java
+ Object, whose type corresponds to the declared type of the parameter. It is up to the
+ annotator to cast it to the appropriate type, String[] in this case.</para>
+
+ <para>If there is a problem retrieving the parameter values, the framework throws an
+ exception. Generally annotators don%apos;t handle these, and just let them
+ propagate up.</para>
+
+ <para>To see the configuration parameters working, run the Document Analyzer
+ application and select the descriptor
+ <literal>examples/descriptors/tutorial/ex2/RoomNumberAnnotator.xml</literal>
+ . In the example document <literal>WatsonConferenceRooms.txt</literal>, you
+ should see some examples of Hawthorne II room numbers that would not have been
+ detected by the ex1 version of RoomNumberAnnotator.</para>
+ </section>
+
+ <section id="ugr.tug.aae.supporting_reconfiguration">
+ <title>Supporting Reconfiguration</title>
+
+ <para>If you take a look at the JavaDocs (located in the <ulink
+ url="api/index.html">docs/api</ulink> directory) for
+ <literal>org.apache.uima.analysis_component.AnaysisComponent</literal>
+ (which our annotator implements indirectly through JCasAnnotator_ImplBase),
+ you will see that there is a reconfigure() method, which is called by the containing
+ application through the UIMA framework, if the configuration parameter values
+ are changed.</para>
+
+ <para>The AnalysisComponent_ImplBase class provides a default implementation
+ that just calls the annotator's destroy method followed by its initialize
+ method. This works fine for our annotator. The only situation in which you might
+ want to override the default reconfigure() is if your annotator has very expensive
+ initialization logic, and you don't want to reinitialize everything if just
+ one configuration parameter has changed. In that case, you can provide a more
+ intelligent implementation of reconfigure() for your annotator.</para>
+
+ </section>
+
+ <section id="ugr.tug.aae.configuration_parameter_groups">
+ <title>Configuration parameter Groups</title>
+
+ <para>For annotators with many sets of configuration parameters, UIMA supports
+ organizing them into groups. It is possible to define a parameter with the same name
+ in multiple groups; one common use for this is for annotators that can process
+ documents in several languages and which want to have different parameter
+ settings for the different languages.</para>
+
+ <para>The syntax for defining parameter groups in your descriptor is fairly
+ straightforward – see <olink targetdoc="&uima_docs_ref;"
+ targetptr="ugr.ref.component_descriptor"/> for details. Values of
+ parameters defined within groups are accessed through the two-argument version
+ of <literal>UimaContext.getConfigParameterValue</literal>, which takes
+ both the group name and the parameter name as its arguments.</para>
+ </section>
</section>
-
- <section id="ugr.tug.aae.configuration_parameter_groups">
- <title>Configuration parameter Groups</title>
-
-<para>For annotators
-with many sets of configuration parameters, UIMA supports organizing them into
-groups. It is possible to define a
-parameter with the same name in multiple groups; one common use for this is for
-annotators that can process documents in several languages and which want to
-have different parameter settings for the different languages.</para>
-
-<para>The syntax for
-defining parameter groups in your descriptor is fairly straightforward –
- see <olink targetdoc="&uima_docs_ref;" targetptr="ugr.ref.component_descriptor"/>
- for details. Values of parameters defined
-within groups are accessed through the two-argument version of
- <literal>UimaContext.getConfigParameterValue</literal>,
-which takes both the group name and the parameter name as its arguments.</para>
-</section>
- </section>
-
- <section id="ugr.tug.aae.logging">
- <title>Logging</title>
-
-<para>The UIMA SDK
-provides a logging facility, which is very similar to the
-java.util.logging.Logger class that was introduced in Java 1.4.</para>
-
-<para>In the Java
-architecture, each logger instance is associated with a name. By convention, this name is often the fully
-qualified class name of the component issuing the logging call. The name can be referenced in a configuration
-file when specifying which kinds of log
-messages to actually log, and where they should go.</para>
-
-<para>The UIMA framework
-supports this convention using the <literal>UimaContext</literal> object.
- If you access a logger instance using <literal>getContext().getLogger()</literal> within an
-Annotator, the logger name will be the fully qualified name of the Annotator
-implementation class.</para>
-
-<para>Here is an example
-from the process method of <literal>org.apache.uima.tutorial.ex2.RoomNumberAnnotator</literal>:
-
-<programlisting>
+
+ <section id="ugr.tug.aae.logging">
+ <title>Logging</title>
+
+ <para>The UIMA SDK provides a logging facility, which is very similar to the
+ java.util.logging.Logger class that was introduced in Java 1.4.</para>
+
+ <para>In the Java architecture, each logger instance is associated with a name. By
+ convention, this name is often the fully qualified class name of the component
+ issuing the logging call. The name can be referenced in a configuration file when
+ specifying which kinds of log messages to actually log, and where they should
+ go.</para>
+
+ <para>The UIMA framework supports this convention using the
+ <literal>UimaContext</literal> object. If you access a logger instance using
+ <literal>getContext().getLogger()</literal> within an Annotator, the logger
+ name will be the fully qualified name of the Annotator implementation class.</para>
+
+ <para>Here is an example from the process method of
+ <literal>org.apache.uima.tutorial.ex2.RoomNumberAnnotator</literal>:
+
+
+ <programlisting>
getContext().getLogger().log(Level.FINEST,"Found: " + annotation);
</programlisting>
- </para>
-
-<para>The first argument
-to the log method is the level of the log output. Here, a value of FINEST indicates that this
-is a highly-detailed tracing message. While
-useful for debugging, it is likely that real applications will not output log
-messages at this level, in order to improve their performance. Other defined levels, from lowest to highest
-importance, are FINER, FINE, CONFIG, INFO, WARNING, and SEVERE.</para>
-
-<para>If no logging
-configuration file is provided (see next section), the Java Virtual Machine
-defaults would be used, which typically set the level to INFO and higher
-messages, and direct output to the console.</para>
-
-<para>If you specify the
-standard UIMA SDK <literal>Logger.properties,</literal> the output will be directed to a file
-named uima.log, in the current working directory (often the <quote>project</quote>
-directory when running from Eclipse, for instance).</para>
-
-<note><para>When using Eclipse, the uima.log file, if written into
-the Eclipse workspace in the project uimaj_examples, for example, may not appear
-in the Eclipse package explorer view until you right-click the uimaj_examples
-project with the mouse, and select <quote>Refresh</quote>. This operation refreshes the Eclipse display
-to conform to what may have changed on the file system.
-Also, you can set the Eclipse preferences for the workspace to automatically refresh
-(Window → Preferences → General → Workspace, then click the <quote>refresh automatically</quote>
- checkbox.</para></note>
-
- <section id="ugr.tug.aae.specifying_logging_configuration">
- <title>Specifying the Logging Configuration</title>
-
-<para>The standard UIMA
-logger uses the underlying Java 1.4 logging mechanism. You can use the APIs that come with that to
-configure the logging. In addition, the standard
-Java 1.4 logging initialization mechanisms will look for a Java System Property named
- <literal>java.util.logging.config.file</literal>
-and if found, will use the value of this property as the name of a standard
-<quote>properties</quote> file, for setting the logging level. Please refer to the Java 1.4. documentation
-for more information on the format and use of this file.</para>
-
-<para>Two sample logging
-specification property files can be found in the UIMA_HOME directory where the UIMA SDK is installed:
- <literal>Logger.properties</literal>, and <literal>FileConsoleLogger.properties</literal>.
- These specify the same logging, except the
-first logs just to a file, while the second logs both to a file and to the
-console. You can edit these files, or create additional ones, as described
-below, to change the logging behavior.</para>
-
-<para>When running your
-own Java application, you can specify the location of the logging configuration
-file on your Java command line by setting the Java system property
- <literal>java.util.logging.config.file</literal>to be the
-logging configuration filename. This
-file specification can be either absolute or relative to the working
-directory. For example:
-
-<programlisting>
+ </para>
+
+ <para>The first argument to the log method is the level of the log output. Here, a value of
+ FINEST indicates that this is a highly-detailed tracing message. While useful for
+ debugging, it is likely that real applications will not output log messages at this
+ level, in order to improve their performance. Other defined levels, from lowest to
+ highest importance, are FINER, FINE, CONFIG, INFO, WARNING, and SEVERE.</para>
+
+ <para>If no logging configuration file is provided (see next section), the Java
+ Virtual Machine defaults would be used, which typically set the level to INFO and
+ higher messages, and direct output to the console.</para>
+
+ <para>If you specify the standard UIMA SDK <literal>Logger.properties,</literal>
+ the output will be directed to a file named uima.log, in the current working directory
+ (often the <quote>project</quote> directory when running from Eclipse, for
+ instance).</para> <note><para>When using Eclipse, the uima.log file, if written
+ into the Eclipse workspace in the project uimaj_examples, for example, may not appear
+ in the Eclipse package explorer view until you right-click the uimaj_examples project
+ with the mouse, and select <quote>Refresh</quote>. This operation refreshes the
+ Eclipse display to conform to what may have changed on the file system. Also, you can set
+ the Eclipse preferences for the workspace to automatically refresh (Window →
+ Preferences → General → Workspace, then click the <quote>refresh
+ automatically</quote> checkbox.</para></note>
+
+ <section id="ugr.tug.aae.configuring_logging">
+ <title>Specifying the Logging Configuration</title>
+
+ <para>The standard UIMA logger uses the underlying Java 1.4 logging mechanism. You
+ can use the APIs that come with that to configure the logging. In addition, the
+ standard Java 1.4 logging initialization mechanisms will look for a Java System
+ Property named <literal>java.util.logging.config.file</literal> and if
+ found, will use the value of this property as the name of a standard
+ <quote>properties</quote> file, for setting the logging level. Please refer to
+ the Java 1.4. documentation for more information on the format and use of this
+ file.</para>
+
+ <para>Two sample logging specification property files can be found in the UIMA_HOME
+ directory where the UIMA SDK is installed:
+ <literal>Logger.properties</literal>, and
+ <literal>FileConsoleLogger.properties</literal>. These specify the same
+ logging, except the first logs just to a file, while the second logs both to a file and
+ to the console. You can edit these files, or create additional ones, as described
+ below, to change the logging behavior.</para>
+
+ <para>When running your own Java application, you can specify the location of the
+ logging configuration file on your Java command line by setting the Java system
+ property <literal>java.util.logging.config.file</literal>to be the logging
+ configuration filename. This file specification can be either absolute or
+ relative to the working directory. For example:
+
+
+ <programlisting>
java "-Djava.util.logging.config.file=C:/Program Files/apache/uima/Logger.properties"
</programlisting>
-
-<note><para>In a shell script, you can use environment variables such as UIMA_HOME
-if convenient.</para></note>
- </para>
-
-<para>If you are using
-Eclipse to launch your application, you can set this property in the VM
-arguments section of the Arguments tab of the run configuration screen.
- If you've set an environment variable
-UIMA_HOME, you could for example, use the string:
- <literal>"-Djava.util.logging.config.file=${env_var:UIMA_HOME}/Logger.properties".</literal></para>
-</section>
-
- <section>
- <title>Setting Logging Levels</title>
-
-
[... 2974 lines stripped ...]