1 import Jet.*;
2 import Jet.Tipster.*;
3 import java.util.Vector;
4 import
java.io.IOException;
5
6 class UseJet {
7
8 public static void
main(String
args[]) throws IOException {
9
System.out.println("Starting
UseJet...");
10
JetTest.initializeFromConfig("C:/My
Documents/Jet/chunk3.properties");
11 String txt =
"<TEXT>My
first sentence to be analyzed for class.</TEXT>";
12 Document doc =
new Document(txt);
13
Control.processDocument
(doc, null, true, 1);
14 Vector v =
doc.annotationsOfType("constit");
15 for (int i=0;
i<v.size(); i++) {
16
Annotation
a = (Annotation) v.get(i);
17
System.out.println
("Constit " + a.get("cat") + " over " + doc.text(a));
18 }
19 }
20 }
and a brief explanation of this program: