Package org.apache.uima.ruta.engine.RutaTestUtils

Examples of org.apache.uima.ruta.engine.RutaTestUtils.TestFeature


   
    Map<String, List<TestFeature>> featureMap = new TreeMap<String, List<TestFeature>>();
    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
    featureMap.put(typeName1, list);
    String fn1 = "cardName";
    list.add(new TestFeature(fn1, "", "uima.cas.String"));
    String fn2 = "cardType";
    list.add(new TestFeature(fn2, "", "uima.cas.String"));
   
    list = new ArrayList<RutaTestUtils.TestFeature>();
    featureMap.put(typeName2, list);
    list.add(new TestFeature(fn1, "", "uima.cas.String"));
    list.add(new TestFeature(fn2, "", "uima.cas.String"));
    String fn3 = "laonName";
    list.add(new TestFeature(fn3, "", "uima.cas.String"));
    String fn4 = "loanType";
    list.add(new TestFeature(fn4, "", "uima.cas.String"));
   
    CAS cas = null;
    try {
      cas = RutaTestUtils.getCAS(document, typeMap, featureMap);
      Ruta.apply(cas, script);
View Full Code Here


    String typeName = "org.apache.uima.Complex";
    complexTypes.put(typeName, "uima.tcas.Annotation");
    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
    features.put(typeName, list);
    String fn1 = "a";
    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));
    String fn2 = "b";
    list.add(new TestFeature(fn2, "", "uima.cas.Boolean"));
    String fn3 = "s";
    list.add(new TestFeature(fn3, "", "uima.cas.String"));
   
    try {
      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name
              + ".txt", 50, false,false,complexTypes,features, null);
    } catch (Exception e) {
View Full Code Here

   
    Map<String, List<TestFeature>> features = new TreeMap<String, List<TestFeature>>();
    List<TestFeature> list = new ArrayList<RutaTestUtils.TestFeature>();
    features.put(typeName, list);
    String fn1 = "a";
    list.add(new TestFeature(fn1, "", "uima.tcas.Annotation"));
    String fn2 = "b";
    list.add(new TestFeature(fn2, "", "uima.tcas.Annotation"));
    String fn3 = "count";
    list.add(new TestFeature(fn3, "", "uima.cas.Integer"));
   
    CAS cas = null;
    try {
      cas = RutaTestUtils.process(namespace + "/" + name + RutaEngine.SCRIPT_FILE_EXTENSION, namespace + "/" + name
              + ".txt", 50, false, false, complexTypes, features, namespace + "/");
View Full Code Here

TOP

Related Classes of org.apache.uima.ruta.engine.RutaTestUtils.TestFeature

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.