edu.stanford.nlp.util
Class KleinUtils

java.lang.Object
  |
  +--edu.stanford.nlp.util.KleinUtils

public class KleinUtils
extends Object

KleinUtils Class for random things. Should be disbanded! [cdm]


Method Summary
static boolean crossingBracket(Constituent pC, Set constituents)
           
static String fileNameClean(String s)
           
static String join(List l)
           
static String join(List l, String glue)
           
static String leftPad(Object obj, int totalChars)
           
static String leftPad(String str, int totalChars)
           
static String pad(Object obj, int totalChars)
           
static String pad(String str, int totalChars)
          Return a String of length a minimum of totalChars characters by padding the input String str with spaces.
static void scoreTree(Tree t, SimpleGrammar g, SimpleLexicon l)
           
static String slurpFile(File file)
           
static void sortObservationList(List list, Factor factor, ScoredComparator sc)
           
static List split(String s)
           
static List split(String s, gnu.regexp.RE pattern)
           
static List stringListToLabelList(List sList)
           
static double toDouble(Double d)
           
static double toDouble(Double d, double n)
           
static Word toWord(Word w)
           
static List treeListToLabelList(List tList)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

slurpFile

public static String slurpFile(File file)
                        throws IOException
IOException

split

public static List split(String s,
                         gnu.regexp.RE pattern)

split

public static List split(String s)

join

public static String join(List l,
                          String glue)

join

public static String join(List l)

treeListToLabelList

public static List treeListToLabelList(List tList)

stringListToLabelList

public static List stringListToLabelList(List sList)

scoreTree

public static void scoreTree(Tree t,
                             SimpleGrammar g,
                             SimpleLexicon l)

toWord

public static Word toWord(Word w)

toDouble

public static double toDouble(Double d)

toDouble

public static double toDouble(Double d,
                              double n)

pad

public static String pad(String str,
                         int totalChars)
Return a String of length a minimum of totalChars characters by padding the input String str with spaces. If str is already longer than totalChars, it is returned unchanged.


pad

public static String pad(Object obj,
                         int totalChars)

leftPad

public static String leftPad(String str,
                             int totalChars)

leftPad

public static String leftPad(Object obj,
                             int totalChars)

sortObservationList

public static void sortObservationList(List list,
                                       Factor factor,
                                       ScoredComparator sc)

fileNameClean

public static String fileNameClean(String s)

crossingBracket

public static boolean crossingBracket(Constituent pC,
                                      Set constituents)


Stanford NLP Group