Converting to lowercase

Converting text to lowercase is a simple process that can improve search results. We can either use Java methods, such as the String class' toLowerCase method, or use the capability found in some NLP APIs, such as LingPipe's LowerCaseTokenizerFactory class. The toLowerCase method is demonstrated here:

String text = "A Sample string with acronyms, IBM, and UPPER " 
+ "and lowercase letters."; String result = text.toLowerCase(); System.out.println(result);

The output will be as follows:

    a sample string with acronyms, ibm, and upper and lowercase letters.
  

LingPipe's LowerCaseTokenizerFactory approach is illustrated in the Normalizing using a pipeline section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset