title: How to get the annotated text for a DictionaryAnnotator
body: <p>I have a dictionary created from the DictionaryCreator from UIMA, I would like to annotate a piece of text using the DictionaryAnnotator and the aforementioned dictionary, I could not figure out how to get the annotated text. Please let me know if you do. Any help is appreciated. The code, the dictionary-file and the descriptor is mentioned below,
  P.S. I'm new to Apache UIMA.</p>
  
  <pre><code> XMLInputSource xml_in = new XMLInputSource("DictionaryAnnotatorDescriptor.xml");
           ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(xml_in);
           AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(specifier);
           JCas jCas = ae.newJCas();
           String inputText = "Mark and John went down the rabbit hole to meet a wise owl and have curry with the owl.";
           jCas.setDocumentText(inputText);
           printResults(jCas);
  
  
  public static void printResults(JCas jcas) {
      FSIndex&lt;Annotation&gt; index = jcas.getAnnotationIndex();
      for (Iterator&lt;Annotation&gt; it = index.iterator(); it.hasNext(); ) {
          Annotation annotation = it.next();
          List&lt;Feature&gt; features;
              features = annotation.getType().getFeatures();
          List&lt;String&gt; fasl = new ArrayList&lt;String&gt;();
          for (Feature feature : features) {
              try {
                  String name = feature.getShortName();
                  System.out.println(feature.getName());
                  String value = annotation.getStringValue(feature);
                  fasl.add(name + "=\"" + value + "\"");
                  System.out.println(value);
              }catch (Exception e){
                  continue;
              }
          }
      }
  }
  
  
  my_dictionary.xml
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;dictionary xmlns="http://incubator.apache.org/uima" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="dictionary.xsd"&gt;
  &lt;typeCollection&gt;
  &lt;dictionaryMetaData caseNormalization="true" multiWordEntries="true" multiWordSeparator=" "/&gt;
  &lt;languageId&gt;en&lt;/languageId&gt;
  &lt;typeDescription&gt;
  &lt;typeName&gt;org.apache.uima.DictionaryEntry&lt;/typeName&gt;
  &lt;/typeDescription&gt;
  &lt;entries&gt;
  &lt;entry&gt;
  &lt;key&gt;Mark&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;John&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;Rabbit&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;Owl&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;Curry&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;ATH-MX50&lt;/key&gt;
  &lt;/entry&gt;
  &lt;entry&gt;
  &lt;key&gt;CC234&lt;/key&gt;
  &lt;/entry&gt;
  &lt;/entries&gt;
  &lt;/typeCollection&gt;
  &lt;/dictionary&gt;
  
  DictionaryAnnotatorDescriptor.xml
  
  &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;analysisEngineDescription xmlns="http://uima.apache.org/resourceSpecifier"&gt;
      &lt;frameworkImplementation&gt;org.apache.uima.java&lt;/frameworkImplementation&gt;
      &lt;primitive&gt;true&lt;/primitive&gt;
      &lt;annotatorImplementationName&gt;org.apache.uima.annotator.dict_annot.impl.DictionaryAnnotator&lt;/annotatorImplementationName&gt;
      &lt;analysisEngineMetaData&gt;
          &lt;name&gt;GeneDictionaryAnnotator&lt;/name&gt;
          &lt;description&gt;&lt;/description&gt;
          &lt;version&gt;0.1&lt;/version&gt;
          &lt;vendor&gt;&lt;/vendor&gt;
          &lt;configurationParameters&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;DictionaryFiles&lt;/name&gt;
                  &lt;description&gt;list of dictionary files to configure the annotator&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;true&lt;/multiValued&gt;
                  &lt;mandatory&gt;true&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;InputMatchType&lt;/name&gt;
                  &lt;description&gt;&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;false&lt;/multiValued&gt;
                  &lt;mandatory&gt;true&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;InputMatchFeaturePath&lt;/name&gt;
                  &lt;description&gt;&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;false&lt;/multiValued&gt;
                  &lt;mandatory&gt;false&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;InputMatchFilterFeaturePath&lt;/name&gt;
                  &lt;description&gt;&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;false&lt;/multiValued&gt;
                  &lt;mandatory&gt;false&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;FilterConditionOperator&lt;/name&gt;
                  &lt;description&gt;&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;false&lt;/multiValued&gt;
                  &lt;mandatory&gt;false&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
              &lt;configurationParameter&gt;
                  &lt;name&gt;FilterConditionValue&lt;/name&gt;
                  &lt;description&gt;&lt;/description&gt;
                  &lt;type&gt;String&lt;/type&gt;
                  &lt;multiValued&gt;false&lt;/multiValued&gt;
                  &lt;mandatory&gt;false&lt;/mandatory&gt;
              &lt;/configurationParameter&gt;
          &lt;/configurationParameters&gt;
          &lt;configurationParameterSettings&gt;
              &lt;nameValuePair&gt;
                  &lt;name&gt;DictionaryFiles&lt;/name&gt;
                  &lt;value&gt;
                      &lt;array&gt;
                          &lt;string&gt;src/main/resources/my_dictionary.xml&lt;/string&gt;
                      &lt;/array&gt;
                  &lt;/value&gt;
              &lt;/nameValuePair&gt;
              &lt;nameValuePair&gt;
                  &lt;name&gt;InputMatchType&lt;/name&gt;
                  &lt;value&gt;
                      &lt;string&gt;org.apache.uima.TokenAnnotation&lt;/string&gt;
                  &lt;/value&gt;
              &lt;/nameValuePair&gt;
          &lt;/configurationParameterSettings&gt;
          &lt;typeSystemDescription&gt;
              &lt;types&gt;
                  &lt;typeDescription&gt;
                      &lt;name&gt;org.apache.uima.DictionaryEntry&lt;/name&gt;
                      &lt;description&gt;&lt;/description&gt;
                      &lt;supertypeName&gt;uima.tcas.Annotation&lt;/supertypeName&gt;
                  &lt;/typeDescription&gt;
                  &lt;typeDescription&gt;
                      &lt;name&gt;org.apache.uima.TokenAnnotation&lt;/name&gt;
                      &lt;description&gt;Single token annotation&lt;/description&gt;
                      &lt;supertypeName&gt;uima.tcas.Annotation&lt;/supertypeName&gt;
                      &lt;features&gt;
                          &lt;featureDescription&gt;
                              &lt;name&gt;tokenType&lt;/name&gt;
                              &lt;description&gt;token type&lt;/description&gt;
                              &lt;rangeTypeName&gt;uima.cas.String&lt;/rangeTypeName&gt;
                          &lt;/featureDescription&gt;
                      &lt;/features&gt;
                  &lt;/typeDescription&gt;
                  &lt;typeDescription&gt;
                      &lt;name&gt;example.Name&lt;/name&gt;
                      &lt;description&gt;A proper name.&lt;/description&gt;
                      &lt;supertypeName&gt;uima.tcas.Annotation&lt;/supertypeName&gt;
                  &lt;/typeDescription&gt;
              &lt;/types&gt;
          &lt;/typeSystemDescription&gt;
          &lt;capabilities&gt;
              &lt;capability&gt;
                  &lt;inputs/&gt;
                  &lt;outputs&gt;
                      &lt;type&gt;example.Name&lt;/type&gt;
                  &lt;/outputs&gt;
                  &lt;languagesSupported/&gt;
              &lt;/capability&gt;
          &lt;/capabilities&gt;
          &lt;operationalProperties&gt;
              &lt;modifiesCas&gt;true&lt;/modifiesCas&gt;
              &lt;multipleDeploymentAllowed&gt;true&lt;/multipleDeploymentAllowed&gt;
              &lt;outputsNewCASes&gt;false&lt;/outputsNewCASes&gt;
          &lt;/operationalProperties&gt;
      &lt;/analysisEngineMetaData&gt;
  &lt;/analysisEngineDescription&gt;
  </code></pre>