Package edu.stanford.nlp.sempre.paraphrase

Source Code of edu.stanford.nlp.sempre.paraphrase.ParaphraseBuilder$Options

package edu.stanford.nlp.sempre.paraphrase;

import com.google.common.base.Strings;

import edu.stanford.nlp.sempre.Executor;
import edu.stanford.nlp.sempre.Params;
import fig.basic.Option;
import fig.basic.Utils;

public class ParaphraseBuilder {
  public static class Options {
    @Option public String inParamsPath;
    @Option public String packageName = "edu.stanford.nlp.sempre";
    @Option public String executor = "SparqlExecutor";
  }
  public static Options opts = new Options();

  public Params params;
  public Executor executor;

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

    // Executor
    if (executor == null) {
      executor = (Executor) Utils.newInstanceHard(opts.packageName + "." + opts.executor);
    }
  }
}
TOP

Related Classes of edu.stanford.nlp.sempre.paraphrase.ParaphraseBuilder$Options

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.