Class Utils


  • public class Utils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.TreeSet<java.lang.String> getCommonWords​(java.lang.String[] firstArray, java.lang.String[] secondArray)
      returns a TreeSet of the common tokens of two strings (white space tokenization is done)
      static java.util.TreeSet<java.lang.String> getDifferentWords​(java.lang.String[] firstArray, java.lang.String[] secondArray)  
      static double getOverlapRatio​(java.lang.String first, java.lang.String second)
      gets the token overlap ratio between two strings whitespace split to get tokens ratio returned is minimum of overlap ratios of both strings
      static java.util.ArrayList<java.lang.String> makeBigrams​(java.lang.String term)  
      static java.lang.String makeUnderScoreBigrams​(java.lang.String term)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • getCommonWords

        public static java.util.TreeSet<java.lang.String> getCommonWords​(java.lang.String[] firstArray,
                                                                         java.lang.String[] secondArray)
        returns a TreeSet of the common tokens of two strings (white space tokenization is done)
        Returns:
      • getDifferentWords

        public static java.util.TreeSet<java.lang.String> getDifferentWords​(java.lang.String[] firstArray,
                                                                            java.lang.String[] secondArray)
      • getOverlapRatio

        public static double getOverlapRatio​(java.lang.String first,
                                             java.lang.String second)
        gets the token overlap ratio between two strings whitespace split to get tokens ratio returned is minimum of overlap ratios of both strings
      • makeBigrams

        public static java.util.ArrayList<java.lang.String> makeBigrams​(java.lang.String term)
      • makeUnderScoreBigrams

        public static java.lang.String makeUnderScoreBigrams​(java.lang.String term)