Examples of Cons


Examples of com.github.krukow.clj_lang.Cons

  }
 
  @Test
  public final void testStructMap() {
     Def def = PersistentStructMap.createSlotMap(
        new Cons("1", new Cons("2", new Cons("3",null))));
     PersistentStructMap<String, Integer> sm = PersistentStructMap.construct(def,
         new Cons(1,new Cons(2,new Cons(3,null))));
    
    for (int i=4;i<10000;i++) {
      sm = (PersistentStructMap<String, Integer>) sm.assoc(i+"", i);
    }
    List<Map.Entry<String, Integer>> l = new ArrayList<Map.Entry<String,Integer>>();
View Full Code Here

Examples of net.sf.kpex.prolog.Cons

    // IO.trace("curr: "+curr);
    Term n = next();
    Term t = null;
    if (n instanceof RbraToken)
    {
      t = new Cons(curr, Const.NIL);
    }
    else if (n instanceof BarToken)
    {
      t = new Cons(curr, getTerm());
      n = next();
      if (!(n instanceof RbraToken))
      {
        throw new ParserException("']'", "bad list end after '|'", n);
      }
    }
    else if (n instanceof CommaToken)
    {
      Term other = getTerm();
      t = new Cons(curr, getListCont(other));
    }
    if (t == null)
    {
      throw new ParserException("| or ]", "bad list continuation", n);
    }
View Full Code Here

Examples of net.sf.kpex.prolog.Cons

  }

  @Override
  public int exec(Prog p)
  {
    Cons L = (Cons) getArg(0);
    return putArg(1, L.getHead(), p);
  }
View Full Code Here

Examples of net.sf.kpex.prolog.Cons

  }

  @Override
  public int exec(Prog p)
  {
    Cons L = (Cons) getArg(0);
    return putArg(1, L.getTail(), p);
  }
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbof = consbo(fn,-2);
    String consbop_1 = consbo(p_1,-1);
    String consbop0 = consbo(p0,0);
    String consbop1 = consbo(p1,1);

    Cons cfp = new Cons(consfp,consbofp,-3,true);
    Cons cf = new Cons(consf,consbof,-2,true);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,true);
    Cons c0 = new Cons(consp0,consbop0,0,true);
    Cons c1 = new Cons(consp1,consbop1,1,true);

    //default
    features.add("default");

    //unigrams
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbop_1 = consbo(p_1, -1);
    String consbop0 = consbo(p0, 0);
    String consbop1 = consbo(p1, 1);
    String consbop2 = consbo(p2, 2);

    Cons c_2 = new Cons(consp_2,consbop_2,-2,u_2);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,u_1);
    Cons c0 = new Cons(consp0,consbop0,0,u0);
    Cons c1 = new Cons(consp1,consbop1,1,u1);
    Cons c2 = new Cons(consp2,consbop2,2,u2);

    //default
    features.add("default");
    //first constituent label
    //features.add("fl="+constituents[0].getLabel());
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbop_1 = consbo(p_1, -1);
    String consbop0 = consbo(p0, 0);
    String consbop1 = consbo(p1, 1);
    String consbop2 = consbo(p2, 2);

    Cons c_2 = new Cons(consp_2,consbop_2,-2,true);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,true);
    Cons c0 = new Cons(consp0,consbop0,0,true);
    Cons c1 = new Cons(consp1,consbop1,1,true);
    Cons c2 = new Cons(consp2,consbop2,2,true);

    List<String> features = new ArrayList<String>();
    features.add("default");

    //unigrams
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbop_1 = consbo(p_1, -1);
    String consbop0 = consbo(p0, 0);
    String consbop1 = consbo(p1, 1);
    String consbop2 = consbo(p2, 2);

    Cons c_2 = new Cons(consp_2,consbop_2,-2,u_2);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,u_1);
    Cons c0 = new Cons(consp0,consbop0,0,u0);
    Cons c1 = new Cons(consp1,consbop1,1,u1);
    Cons c2 = new Cons(consp2,consbop2,2,u2);

    //default
    features.add("default");
    //first constituent label
    //features.add("fl="+constituents[0].getLabel());
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbof = consbo(fn,-2);
    String consbop_1 = consbo(p_1,-1);
    String consbop0 = consbo(p0,0);
    String consbop1 = consbo(p1,1);

    Cons cfp = new Cons(consfp,consbofp,-3,true);
    Cons cf = new Cons(consf,consbof,-2,true);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,true);
    Cons c0 = new Cons(consp0,consbop0,0,true);
    Cons c1 = new Cons(consp1,consbop1,1,true);

    //default
    features.add("default");

    //unigrams
View Full Code Here

Examples of opennlp.tools.parser.Cons

    String consbop_1 = consbo(p_1, -1);
    String consbop0 = consbo(p0, 0);
    String consbop1 = consbo(p1, 1);
    String consbop2 = consbo(p2, 2);

    Cons c_2 = new Cons(consp_2,consbop_2,-2,true);
    Cons c_1 = new Cons(consp_1,consbop_1,-1,true);
    Cons c0 = new Cons(consp0,consbop0,0,true);
    Cons c1 = new Cons(consp1,consbop1,1,true);
    Cons c2 = new Cons(consp2,consbop2,2,true);

    List<String> features = new ArrayList<String>();
    features.add("default");

    //unigrams
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.