Package org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService

Examples of org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService.SimilarityMetricEnum


  public void setMetricNames(String metricNames) {
    this.metricNames = metricNames;
    this.metrics = new ArrayList<SimilarityMetricEnum>();
    for(String metricName : metricNames.split(",")) {
      SimilarityMetricEnum s = SimilarityMetricEnum.valueOf(metricName);
      if(s == null) {
        throw new RuntimeException("invalid metric name: " + metricName);
      }
      metrics.add(s);
    }
View Full Code Here


  }

  private List<SimilarityMetricEnum> metricArrayToList(String[] metrics) {
    List<SimilarityMetricEnum> metricIndexMap = new ArrayList<SimilarityMetricEnum>();
    for (String metric : metrics) {
      SimilarityMetricEnum m = SimilarityMetricEnum.valueOf(metric);
      if (m != null)
        metricIndexMap.add(m);
    }
    return metricIndexMap;
  }
View Full Code Here

TOP

Related Classes of org.apache.ctakes.ytex.kernel.metric.ConceptSimilarityService.SimilarityMetricEnum

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.