Package org.apache.uima.ruta.verbalize

Examples of org.apache.uima.ruta.verbalize.RutaVerbalizer.verbalize()


    assertEquals("\"string\" + anyVar"  , s);
   
   
    StringListExpression sle1 = new SimpleStringListExpression(stringExprList);
    StringListExpression sle2 = new ReferenceStringListExpression(var);
    s = v.verbalize(sle1);
    assertEquals("{\"string\", anyVar}", s);
    s = v.verbalize(sle2);
    assertEquals("anyVar", s);
   
    List<IBooleanExpression> boolExprList = new ArrayList<IBooleanExpression>();
View Full Code Here


   
    StringListExpression sle1 = new SimpleStringListExpression(stringExprList);
    StringListExpression sle2 = new ReferenceStringListExpression(var);
    s = v.verbalize(sle1);
    assertEquals("{\"string\", anyVar}", s);
    s = v.verbalize(sle2);
    assertEquals("anyVar", s);
   
    List<IBooleanExpression> boolExprList = new ArrayList<IBooleanExpression>();
    boolExprList.add(boolExpr1);
    boolExprList.add(boolExpr3);
View Full Code Here

    List<IBooleanExpression> boolExprList = new ArrayList<IBooleanExpression>();
    boolExprList.add(boolExpr1);
    boolExprList.add(boolExpr3);
    BooleanListExpression ble1 = new SimpleBooleanListExpression(boolExprList);
    BooleanListExpression ble2 = new ReferenceBooleanListExpression(var);
    s = v.verbalize(ble1);
    assertEquals("{true, anyVar}", s);
    s = v.verbalize(ble2);
    assertEquals("anyVar", s);
   
    List<INumberExpression> numExprList = new ArrayList<INumberExpression>();
View Full Code Here

    boolExprList.add(boolExpr3);
    BooleanListExpression ble1 = new SimpleBooleanListExpression(boolExprList);
    BooleanListExpression ble2 = new ReferenceBooleanListExpression(var);
    s = v.verbalize(ble1);
    assertEquals("{true, anyVar}", s);
    s = v.verbalize(ble2);
    assertEquals("anyVar", s);
   
    List<INumberExpression> numExprList = new ArrayList<INumberExpression>();
    numExprList.add(numExpr1);
    numExprList.add(numExpr3);
View Full Code Here

    List<INumberExpression> numExprList = new ArrayList<INumberExpression>();
    numExprList.add(numExpr1);
    numExprList.add(numExpr3);
    NumberListExpression nle1 = new SimpleNumberListExpression(numExprList);
    NumberListExpression nle2 = new ReferenceNumberListExpression(var);
    s = v.verbalize(nle1);
    assertEquals("{4, 4.9}", s);
    s = v.verbalize(nle2);
    assertEquals("anyVar", s);
   
    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
View Full Code Here

    numExprList.add(numExpr3);
    NumberListExpression nle1 = new SimpleNumberListExpression(numExprList);
    NumberListExpression nle2 = new ReferenceNumberListExpression(var);
    s = v.verbalize(nle1);
    assertEquals("{4, 4.9}", s);
    s = v.verbalize(nle2);
    assertEquals("anyVar", s);
   
    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
    typeExprList.add(typeExpr1);
    typeExprList.add(typeExpr2);
View Full Code Here

    List<TypeExpression> typeExprList = new ArrayList<TypeExpression>();
    typeExprList.add(typeExpr1);
    typeExprList.add(typeExpr2);
    TypeListExpression tle1 = new SimpleTypeListExpression(typeExprList);
    TypeListExpression tle2 = new ReferenceTypeListExpression(var);
    s = v.verbalize(tle1);
    assertEquals("{Type1, typeVar}", s);
    s = v.verbalize(tle2);
    assertEquals("anyVar", s);
   
  }
View Full Code Here

    typeExprList.add(typeExpr2);
    TypeListExpression tle1 = new SimpleTypeListExpression(typeExprList);
    TypeListExpression tle2 = new ReferenceTypeListExpression(var);
    s = v.verbalize(tle1);
    assertEquals("{Type1, typeVar}", s);
    s = v.verbalize(tle2);
    assertEquals("anyVar", s);
   
  }
}
View Full Code Here

    AbstractRutaCondition c = null;
    String s = null;

    // AFTER
    c = new AfterCondition(typeExpr1);
    s = v.verbalize(c);
    assertEquals("AFTER(Type1)", s);

    c = new AfterCondition(typeExpr2);
    s = v.verbalize(c);
    assertEquals("AFTER(typeVar)", s);
View Full Code Here

    c = new AfterCondition(typeExpr1);
    s = v.verbalize(c);
    assertEquals("AFTER(Type1)", s);

    c = new AfterCondition(typeExpr2);
    s = v.verbalize(c);
    assertEquals("AFTER(typeVar)", s);

    c = new AfterCondition(typeListExpr);
    s = v.verbalize(c);
    assertEquals("AFTER({Type1, typeVar})", s);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.