Html Annotator,Html Converter in Uima Ruta
<p>Can anyone briefly explain about the Html annotator, Html converter and TEIViewWriter with some examples.I want to create annotations in the initial view.</p>

<p>Awaiting for the Answer.</p>

<p>Main Script:</p>

<pre><code> PACKAGE uima.ruta.example;
 SCRIPT uima.ruta.example.Html;
 Document{-&gt; EXEC(Html)};
 WORDLIST JOURNALNAMELIST='JournalName.txt';
 WORDLIST CITYPUBLIST='CITYPUB.txt';
 DECLARE JOURNALNAME;
 DECLARE CITYPUB;
 Document{ -&gt; MARKFAST(JOURNALNAME, JOURNALNAMELIST)};
 Document{ -&gt; MARKFAST(CITYPUB, CITYPUBLIST)};
 DECLARE Reference;
 "&lt;a name=para(.+?)&gt;(.+?)&lt;/a&gt;"-&gt; 2=Reference;
 DECLARE FirstToken, LastToken;

 BLOCK(InRef) Reference{}
 {
 ANY{POSITION(Reference,1) -&gt; MARK(FirstToken)};
 Document{-&gt; MARKLAST(LastToken)};
 }
 DECLARE FIRSTWORD;
 FirstToken PERIOD CW {-&gt;MARK(FIRSTWORD)};
</code></pre>

<p>Html Script:</p>

<pre><code> PACKAGE uima.ruta.example;
 ENGINE utils.HtmlAnnotator;
 ENGINE utils.HtmlConverter;
 ENGINE utils.HtmlViewWriter;
 TYPESYSTEM utils.HtmlTypeSystem;
 TYPESYSTEM utils.SourceDocumentInformation;
 Document{-&gt; EXEC(HtmlAnnotator)};
 Document { -&gt; CONFIGURE(HtmlConverter, "inputView" = "_InitialView","outputView" = "plain"),
 EXEC(HtmlConverter)};
 Document{ -&gt; CONFIGURE(HtmlViewWriter, "inputView" = "plain","outputView" = "_InitialView", "output" = "E:/ruta-2.4.0-source-release/ruta-2.4.0/example-projects/TextRulerExample/output"),
 EXEC(HtmlViewWriter)};
</code></pre>

<p>Sample Html Input file:(manually converted into html by changing extension)</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
 &lt;meta http-equiv=Content-Type content="text/html; charset=windows-1252"&gt;
 &lt;meta name=Generator content="Microsoft Word 14 (filtered)"&gt;
 &lt;style&gt;
 &lt;!--
/* Font Definitions */
 @font-face
 {font-family:Calibri;
 panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
 {margin-top:0in;
 margin-right:0in;
 margin-bottom:10.0pt;
 margin-left:0in;
 line-height:115%;
 font-size:11.0pt;
 font-family:"Calibri","sans-serif";}
span.DAZZLEFN
 {mso-style-name:DAZZLEFN;}
span.DAZZLELN
 {mso-style-name:DAZZLELN;
 color:#92D050;}
.MsoChpDefault
 {font-family:"Calibri","sans-serif";}
.MsoPapDefault
 {margin-bottom:10.0pt;
 line-height:115%;}
@page WordSection1
 {size:8.5in 11.0in;
 margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
 {page:WordSection1;}
--&gt;
&lt;/style&gt;

&lt;/head&gt;

&lt;body lang=EN-US&gt;

&lt;div class=WordSection1&gt;

&lt;p class=MsoNormal&gt;&lt;a name=para0&gt;REFERENCES&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para1&gt;1.����������� Lawrence RA. A        review of the
 medical benefits and contraindications to breastfeeding in the United    States
 [Internet] . Arlington (VA): National Center for Education in Maternal and
 Child Health; 1997 Oct [cited 2000 Apr 24]. p. 40. Available from:
 www.ncemch.org/pubs/PDFs/Welcometojungle.pdf.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para2&gt;2.����������� Shishido A.  Retraction notice:
 Effect of platinum compounds on murine lymphocyte mitogenesis [Retraction of
 Alsabti EA, Ghalib ON, Salem MH. In: Jpn J Med Biol 1979 Apr; 32(2):53-65].      Jpn
 J Med Sci Biol 1980 Aug;33(4):235-237.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para3&gt;3.����������� Leist TP,  Zinkernagel RM.
 Effects of treatment with IL-2 receptor specific monoclonal antibody in mice
 [letter] [Retraction of Leist TP, Kohler M, Eppler M, Zinkernagel RM. In: J
 Immunol 1989 Jul 15; 143(2): 628-32]. J Immunol 1990 Apr 1;144(7):2847.&lt;/a&gt;  &lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para4&gt;4.����������� Alsabti EA, Ghalib     ON, Salem MH.
 Effect of platinum compounds on murine lymphocyte mitogenesis [Retracted by
 Shishido A. In: Jpn J Med Sci Biol 1980 Aug; 33(4):235-7]. Jpn J Med Sci  Biol
 1979 Apr;32(2):53-65.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para5&gt;5.����������� Tidy JA, Parry GC, Ward P,
 Coleman DV, Peto J, Malcolm AD, Farrell PJ. High rate of papillomavirus type 16
 infection in cytologically normal cervices [letter] [Retracted by Tidy J,
 Farrell PJ. In: Lancet 1989 Dec 23-30:2(8678-8679):1535]. Lancet 1989 Feb   25;1(8635):434.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para6&gt;6.����������� Magni F, Rossoni G,  Berti F.
 BN-52021 protects guinea-pig from heard anaphylaxis. Pharm Res Commun 1988
 Dec;20 Suppl 5:75-78.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para7&gt;7.����������� Garvia EE, DeHaven ED. An
 experimental analysis of response acquisition and elimination with positive
 reinforcers. Behav Neuropsychiatry 1975 a April-1976 May;7(1-12):71-78.&lt;/a&gt;  &lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para8&gt;8.����������� Mueller FO,   Schindler RD. Annual
 survey of football injury research 1931-1985. [place unknown]: American
 Football Coaches Assn; 1986. 24 p.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para9&gt;9.����������� Stern, Michael P.   National
 Institute of Arthritis, Diabetes, and Digestive and Kidney Diseases.   Diabetes
 in America: diabetes data compiled 1984.. [Bethesda (MD)]: The Institute; 1985
 Aug. Diabetes in Hispanic Americans. Chapter 9. (NIH publication; no. 86- 1468).&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para10&gt;10.��������� Vivian, Valerie L,      editor. Child
 abuse and neglect: a medical community response. 1st AMA National   Conference on
 Child Abuse and Neglect; 1984 March 30-June 31; Chicago. Chicago: American
 Medical Association; 1985. 256 p.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para11&gt;11.��������� Popper, Hans, et al.,   editors.
 Structural carbohydrates in the liver: proceedings of the 34th Falk   Symposium;
 1982 oct 12-19; Basil, Switzerland.Boston: MTB Press; 1983. 701 p.&lt;/a&gt;&lt;/p&gt;

 &lt;p class=MsoNormal&gt;&lt;a name=para12&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;

 &lt;/div&gt;

 &lt;/body&gt;

 &lt;/html&gt;
</code></pre>