I´m trying to use Mallet for Topic Modelling. So here´s my code:
{
ArrayList<Pipe> pipeList = new ArrayList<Pipe>();
// Lowercase everything
pipeList.add(new CharSequenceLowercase());
// Unicode letters, underscore, and hashtag
Pattern pat = Pattern.compile("[\\p{L}_#]+");
pipeList.add(new CharSequence2TokenSequence(pat));
// Remove stop words
pipeList.add( new TokenSequenceRemoveStopwords(new File("C:\\mallet\\stoplists\\en.txt"), "UTF-8", false, false, false) );
// Convert the token sequence to a feature sequence.
pipeList.add(new TokenSequence2FeatureSequence());
return pipeList;
}
If I run the program it says
Exception in thread "main" java.lang.IllegalArgumentException: Trouble reading file C:\mallet\stoplists\en.txt
Could someone please help me solve this problem?