com.github.chen0040.data.text.LowerCase Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-data-text Show documentation
Show all versions of java-data-text Show documentation
Java implementation of text processing such as stemmers
package com.github.chen0040.data.text;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* Created by xschen on 9/10/15.
*/
public class LowerCase implements Serializable, TextFilter {
private static final long serialVersionUID = 4206255149536921311L;
@Override
public List filter(List words) {
List result = new ArrayList<>();
for(int i=0; i < words.size(); ++i){
result.add(words.get(i).toLowerCase());
}
return result;
}
public LowerCase makeCopy(){
return new LowerCase();
}
}