public VerbOceanLexicalResource(ConfigurationParams params)
     throws LexicalResourceException, ConfigurationException {
   this(
       params.getDouble(PARAM_SCORE_THRESHOLD),
       params.getFile(PARAM_FILE),
       params.getEnumSet(RelationType.class, PARAM_ALLOWED_RELATIONS));
 }
コード例 #2
0
  public BasicVectorTruncate(ConfigurationParams params) throws ConfigurationException {
    double minScore = Double.MIN_VALUE;
    try {
      minScore = params.getDouble(Configuration.MIN_SCORE);
    } catch (ConfigurationException e) {
    }

    double percent = 1;
    try {
      percent = params.getDouble(Configuration.PERCENT);
    } catch (ConfigurationException e) {

    }

    init(percent, params.getInt(Configuration.TOPN), minScore);
  }