Package edu.isi.karma.cleaning

Examples of edu.isi.karma.cleaning.ProgSynthesis


              + Arrays.toString(elem));
        }
        String ofpath = "/Users/bowu/Research/50newdata/tmp/"
            + nf.getName();
        CSVWriter cw = new CSVWriter(new FileWriter(new File(ofpath)));
        ProgSynthesis psProgSynthesis = new ProgSynthesis();       
        psProgSynthesis.inite(examples,dpp,msger); //
        Collection<ProgramRule> ps = psProgSynthesis.run_main();
        msger.updateCM_Constr(psProgSynthesis.partiCluster
            .getConstraints());
        msger.updateWeights(psProgSynthesis.partiCluster.weights);
        ProgramRule pr = ps.iterator().next();
        System.out.println(""+psProgSynthesis.myprog.toString());
View Full Code Here


    // {"<_START>Artist unknown Salem, Massachusetts area<_END>","Artist unknown"};
    examples.add(xStrings);
    examples.add(yStrings);
    ArrayList<String> data = new ArrayList<String>();
    // examples.add(zStrings);
    ProgSynthesis psProgSynthesis = new ProgSynthesis();
    DataPreProcessor dbDataPreProcessor = new DataPreProcessor(data);
    Vector<Vector<String[]>> cstrns = new Vector<Vector<String[]>>();

    psProgSynthesis.inite(examples,dbDataPreProcessor,cstrns);
    Collection<ProgramRule> ps = psProgSynthesis.run_main();
    ProgramRule pr = ps.iterator().next();
    System.out.println("" + pr.toString());
    String val = "J. B. Blunk";
    InterpreterType rule = pr.getRuleForValue(val);
    System.out.println(rule.execute(val));
View Full Code Here

    while (iter.hasNext()) {
      TransformationExample t = iter.next();
      String[] tmp = { t.getBefore(), t.getAfter() };
      exps.add(tmp);
    }
    ProgSynthesis psProgSynthesis = new ProgSynthesis();
    psProgSynthesis.inite(exps, input.dpp, input.msg);
    // add time out here
    Collection<ProgramRule> rules = null;
    rules = psProgSynthesis.adaptive_main();
    input.msg.updateCM_Constr(psProgSynthesis.partiCluster.getConstraints());
    input.msg.updateWeights(psProgSynthesis.partiCluster.weights);

    if (rules == null || rules.size() == 0) {
      ProgramRule r = new ProgramRule(ProgramRule.IDENTITY);
View Full Code Here

          long iterAfterNoFatalError = 0;
          long isvisible = 0;
          HashMap<String, Vector<String[]>> expFeData = new HashMap<String, Vector<String[]>>();
          Vector<String> resultString = new Vector<String>();
          xHashMap = new HashMap<String, String[]>();
          ProgSynthesis psProgSynthesis = new ProgSynthesis();
          HashMap<String, String> unlabeledData = new HashMap<String, String>();
          for (int i = 0; i < vtmp.size(); i++) {
            unlabeledData.put("" + i, vtmp.get(i));
          }
          psProgSynthesis.inite(examples, dpp, msger);
          Vector<ProgramRule> pls = new Vector<ProgramRule>();
          Collection<ProgramRule> ps = psProgSynthesis.run_main();
          // collect history contraints
          msger.updateCM_Constr(psProgSynthesis.partiCluster
              .getConstraints());
          msger.updateWeights(psProgSynthesis.partiCluster.weights);
          // constraints.addAll();
View Full Code Here

          long iterAfterNoFatalError = 0;
          long isvisible = 0;
          HashMap<String, Vector<String[]>> expFeData = new HashMap<String, Vector<String[]>>();
          Vector<String> resultString = new Vector<String>();
          xHashMap = new HashMap<String, String[]>();
          ProgSynthesis psProgSynthesis = new ProgSynthesis();
          HashMap<String, String> unlabeledData = new HashMap<String, String>();
          for (int i = 0; i < vtmp.size(); i++) {
            unlabeledData.put("" + i, vtmp.get(i));
          }
          psProgSynthesis.inite(examples, dpp, msger);
          Vector<ProgramRule> pls = new Vector<ProgramRule>();
          Collection<ProgramRule> ps = psProgSynthesis.run_main();
          // collect history contraints
          msger.updateCM_Constr(psProgSynthesis.partiCluster
              .getConstraints());
          msger.updateWeights(psProgSynthesis.partiCluster.weights);
          // constraints.addAll();
View Full Code Here

    while (i<exps.size()) // repeat as no incorrect answer appears.
    {
      String[] tmt = { "<_START>" + exps.get(i)[0] + "<_END>", exps.get(i)[1] };
      examples.add(tmt);
      xHashMap = new HashMap<String, String[]>();
      ProgSynthesis psProgSynthesis = new ProgSynthesis();
      psProgSynthesis.inite(examples, dpp, msger);
      Vector<ProgramRule> pls = new Vector<ProgramRule>();
      long t1 = System.currentTimeMillis();
      Collection<ProgramRule> ps = psProgSynthesis.run_main();
      long span = System.currentTimeMillis()-t1;
      timeres += span+",";
      // collect history contraints
      msger.updateCM_Constr(psProgSynthesis.partiCluster.getConstraints());
      msger.updateWeights(psProgSynthesis.partiCluster.weights);
View Full Code Here

    while (i<exps.size()) // repeat as no incorrect answer appears.
    {
      String[] tmt = { "<_START>" + exps.get(i)[0] + "<_END>", exps.get(i)[1] };
      examples.add(tmt);
      xHashMap = new HashMap<String, String[]>();
      ProgSynthesis psProgSynthesis = new ProgSynthesis();
      psProgSynthesis.inite(examples, dpp, msger);
      Vector<ProgramRule> pls = new Vector<ProgramRule>();
      long t1 = System.currentTimeMillis();
      Collection<ProgramRule> ps = psProgSynthesis.adaptive_main();
      long span = System.currentTimeMillis()-t1;
      timeres += span+",";
      // collect history contraints
      msger.updateCM_Constr(psProgSynthesis.partiCluster.getConstraints());
      msger.updateWeights(psProgSynthesis.partiCluster.weights);
View Full Code Here

            long checknumber = 1;
            long iterAfterNoFatalError = 0;
            HashMap<String, Vector<String[]>> expFeData = new HashMap<String, Vector<String[]>>();
            Vector<String> resultString = new Vector<String>();
            xHashMap = new HashMap<String, String[]>();
            ProgSynthesis psProgSynthesis = new ProgSynthesis();
            HashMap<String, String> unlabeledData = new HashMap<String, String>();
            for (int i = 0; i < vtmp.size(); i++) {
              unlabeledData.put("" + i, vtmp.get(i));
            }
            psProgSynthesis.inite(examples, dpp, msger);
            Vector<ProgramRule> pls = new Vector<ProgramRule>();
            Collection<ProgramRule> ps = psProgSynthesis
                .adaptive_main();
            // collect history contraints
            msger.updateCM_Constr(psProgSynthesis.partiCluster
                .getConstraints());
            msger.updateWeights(psProgSynthesis.partiCluster.weights);
View Full Code Here

            long iterAfterNoFatalError = 0;
            long isvisible = 0;
            HashMap<String, Vector<String[]>> expFeData = new HashMap<String, Vector<String[]>>();
            Vector<String> resultString = new Vector<String>();
            xHashMap = new HashMap<String, String[]>();
            ProgSynthesis psProgSynthesis = new ProgSynthesis();
            HashMap<String, String> unlabeledData = new HashMap<String, String>();
            for (int i = 0; i < vtmp.size(); i++) {
              unlabeledData.put("" + i, vtmp.get(i));
            }
            psProgSynthesis.inite(examples, dpp, msger);
            Vector<ProgramRule> pls = new Vector<ProgramRule>();
            Collection<ProgramRule> ps = psProgSynthesis.run_main();
            // collect history contraints
            msger.updateCM_Constr(psProgSynthesis.partiCluster
                .getConstraints());
            msger.updateWeights(psProgSynthesis.partiCluster.weights);
            // constraints.addAll();
View Full Code Here

TOP

Related Classes of edu.isi.karma.cleaning.ProgSynthesis

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.