gov.llnl.ontology.util
Class StringUtils

java.lang.Object
  extended by gov.llnl.ontology.util.StringUtils

public class StringUtils
extends Object

A collection of string utilities.

Author:
Keith Stevens

Constructor Summary
StringUtils()
           
 
Method Summary
static int findOverlap(String[] tokens1, int i, String[] tokens2, int j)
          Determines the length of a sequence overlap in tokens1
static int tokenOverlap(String[] tokens1, String[] tokens2)
          Returns the number of tokens that overlap between tokens1 and tokens2
static int tokenOverlapExp(String[] tokens1, String[] tokens2)
          Returns the number of tokens that overlap between tokens1 and tokens2, but whenever a sequence of tokens overlap, their score is the sequence length to the power of two.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringUtils

public StringUtils()
Method Detail

tokenOverlap

public static int tokenOverlap(String[] tokens1,
                               String[] tokens2)
Returns the number of tokens that overlap between tokens1 and tokens2


tokenOverlapExp

public static int tokenOverlapExp(String[] tokens1,
                                  String[] tokens2)
Returns the number of tokens that overlap between tokens1 and tokens2, but whenever a sequence of tokens overlap, their score is the sequence length to the power of two.


findOverlap

public static int findOverlap(String[] tokens1,
                              int i,
                              String[] tokens2,
                              int j)
Determines the length of a sequence overlap in tokens1



Copyright © 2010-2011. All Rights Reserved.