de.aitools.dm.clusterlabeling.validation
Class StringMatching

java.lang.Object
  extended by de.aitools.dm.clusterlabeling.validation.StringMatching

public class StringMatching
extends java.lang.Object

Version:
$Id: StringMatching.java,v 1.1 2011/02/18 16:08:24 hoppe Exp $
Author:
johannes.kiesel(/\t)uni-weimar.de

Nested Class Summary
static class StringMatching.Match
          For a given cluster with predefined label S, calculated label L and (if used) synonyms SL of L: Exact Match: L is an exact match of S, if L or any synonym SL is equal to S Partial Match: L is an partial match of S, if L or any synonym SL shares a space-separated term with S
 
Method Summary
static double log2(double a)
           
static boolean match(java.util.List<java.lang.String> referenceLabel, java.util.List<java.lang.String> clusterLabel, StringMatching.Match matchType)
           
static boolean match(java.lang.String referenceLabel, java.lang.String clusterLabel, StringMatching.Match matchType)
           
static boolean matchIn(java.lang.String referenceLabel, java.lang.String[] clusterLabels, StringMatching.Match matchType)
           
static java.util.List<java.lang.String> split(java.lang.String phrase)
           
static java.lang.String[] splitClusterLabels(java.lang.String clusterLabels)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

splitClusterLabels

public static java.lang.String[] splitClusterLabels(java.lang.String clusterLabels)

matchIn

public static boolean matchIn(java.lang.String referenceLabel,
                              java.lang.String[] clusterLabels,
                              StringMatching.Match matchType)
Parameters:
clusterLabel -
referenceLabels -
matchType -
Returns:
true if one of the words in referenceLabels matches the clusterLabel

match

public static boolean match(java.lang.String referenceLabel,
                            java.lang.String clusterLabel,
                            StringMatching.Match matchType)

match

public static boolean match(java.util.List<java.lang.String> referenceLabel,
                            java.util.List<java.lang.String> clusterLabel,
                            StringMatching.Match matchType)

split

public static java.util.List<java.lang.String> split(java.lang.String phrase)

log2

public static double log2(double a)