Examples of RamblerValueCollection


Examples of edu.isi.karma.rep.cleaning.RamblerValueCollection

    return rvco;
  }

  private RamblerTransformationOutput applyRamblerTransformation(
      HashMap<String, String> rows,DataPreProcessor dpp, Messager msg) {
    RamblerValueCollection vc = new RamblerValueCollection(rows);
    RamblerTransformationInputs inputs = new RamblerTransformationInputs(
        examples, vc,dpp,msg);
    // generate the program
    boolean results = false;
    int iterNum = 0;
View Full Code Here

Examples of edu.isi.karma.rep.cleaning.RamblerValueCollection

      String originalVal = node.getValue().asString();
      rows.put(id, originalVal);
      this.compResultString += originalVal + "\n";
      calAmbScore(id, originalVal, amb);
    }
    RamblerValueCollection vc = new RamblerValueCollection(rows);
    HashMap<String, Vector<String[]>> expFeData = new HashMap<String, Vector<String[]>>();
    Messager mg = null;
    if(wk.getMsg()!= null)
    {
      mg = (Messager) wk.getMsg();
    }
    else
    {
      mg = new Messager();
      wk.setMsg(mg);
    }
    DataPreProcessor dp = null;
    if(wk.getDpp()!= null)
    {
      dp = (DataPreProcessor) wk.getDpp();
    }
    else
    {
      dp = new DataPreProcessor(rows.values());
      dp.run();
      wk.setDpp(dp);
    }
    inputs = new RamblerTransformationInputs(examples, vc,dp,mg);
    // generate the program
    boolean results = false;
    int iterNum = 0;
    RamblerTransformationOutput rtf = null;
    // initialize the vocabulary
    Iterator<String> iterx = inputs.getInputValues().getValues().iterator();
    Vector<String> v = new Vector<String>();
    int vb_cnt = 0;
    while(iterx.hasNext() && vb_cnt < 30)
    {
      String eString = iterx.next();
      v.add(eString);
      vb_cnt ++;
    }
    while (iterNum < 1 && !results) // try to find an program within iterNum
    {
      rtf = new RamblerTransformationOutput(inputs);
      if (rtf.getTransformations().keySet().size() > 0) {
        results = true;
      }
      iterNum++;
    }
    Iterator<String> iter = rtf.getTransformations().keySet().iterator();
    // id:{org: tar: orgdis: tardis: }
    HashMap<String, HashMap<String, String>> resdata = new HashMap<String, HashMap<String, String>>();
    HashSet<String> keys = new HashSet<String>();
    while (iter.hasNext()) {
      String tpid = iter.next();
      ValueCollection rvco = rtf.getTransformedValues_debug(tpid);
      if (rvco == null)
        continue;
      // constructing displaying data
      HashMap<String, String[]> xyzHashMap = new HashMap<String, String[]>();
      for (String key : rvco.getNodeIDs()) {
        HashMap<String, String> dict = new HashMap<String, String>();
        // add to the example selection
        boolean isExp = false;
        String org = vc.getValue(key);
        String classLabel = rvco.getClass(key);
        String pretar = rvco.getValue(key);
        String dummyValue = pretar;
        if(pretar.indexOf("_FATAL_ERROR_")!= -1)
        {
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.