Package edu.stanford.nlp.sempre

Examples of edu.stanford.nlp.sempre.Params$Options


    ParaphraseExample paraExample =new ParaphraseExample("what do people in the czech republic speak?",
        "the official language of czech republic ?",new BooleanValue(true));
    if(args[0].equals("full_matrix")) {
      opts.similarityFunc="full_matrix";
      VectorSpaceModel vsm = VectorSpaceModel.getSingleton();
      Params params = new Params();
      params.read("/Users/jonathanberant/Research/temp/918params"); //full matrix
      vsm.printWordSimilarity(paraExample,params);
    }
    else if(args[0].equals("diagonal")) {
      opts.similarityFunc="diagonal";
      VectorSpaceModel vsm = VectorSpaceModel.getSingleton();
      Params params = new Params();
      params.read("/Users/jonathanberant/Research/temp/949params"); //diagonal
      vsm.printWordSimilarity(paraExample,params);
    }
    else {
      opts.similarityFunc="dot_product";
      VectorSpaceModel vsm = VectorSpaceModel.getSingleton();
      Params params = new Params();
      params.read("/Users/jonathanberant/Research/temp/954params"); //diagonal
      vsm.printWordSimilarity(paraExample,params);
    }
  }
View Full Code Here


  public Executor executor;

  public void build() {
    // Parameters
    if (params == null) {
      params = new Params();
      if (!Strings.isNullOrEmpty(opts.inParamsPath))
        params.read(opts.inParamsPath);
    }

    // Executor
View Full Code Here

  public static void main(String[] args) throws IOException {

    ParaphraseExample paraExample =new ParaphraseExample("what type of music did richard wagner play ?",
        "what is the musical genres of richard wagner ?",new BooleanValue(true));
    Aligner aligner = new Aligner();
    Params params = new Params();
    params.read("/Users/jonathanberant/Research/temp/params");
    Alignment alignment = aligner.align(paraExample, params);
    alignment.printFeaturesAndWeights(params)
  }
View Full Code Here

  }

  private List<Params> getParamsPerExec(int iter) {
    List<Params> params = new ArrayList<Params>();
    for (String execPath : execPaths) {
      Params p = new Params();
      p.read(execPath + "/params." + iter);
      params.add(p);
    }
    return params;
  }
View Full Code Here

class HeuristicEntityModel extends EntityModel {

  public HeuristicEntityModel(Parser parser,ContextModel contextMapper) {
    super(parser,contextMapper);
    params = new Params(); //no params in this model
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.sempre.Params$Options

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.