Example usage for org.apache.commons.lang3 StringUtils lowerCase

List of usage examples for org.apache.commons.lang3 StringUtils lowerCase

Introduction

In this page you can find the example usage for org.apache.commons.lang3 StringUtils lowerCase.

Prototype

public static String lowerCase(final String str) 

Source Link

Document

Converts a String to lower case as per String#toLowerCase() .

A null input String returns null .

 StringUtils.lowerCase(null)  = null StringUtils.lowerCase("")    = "" StringUtils.lowerCase("aBc") = "abc" 

Note: As described in the documentation for String#toLowerCase() , the result of this method is affected by the current locale.

Usage

From source file:util.SimilarityScorer.java

private List<List<String>> getDocuments() {
    List<List<String>> documents = new ArrayList<>();

    for (Question question : questions) {
        String lower = StringUtils.lowerCase(question.text);
        List<String> token = NLPUtil.stems(lower);
        documents.add(token);//from   w w w .j a  v a  2 s  . co m
    }
    return documents;
}