In MALLET Java API, why can't the Input2CharSequence pipe feed into the CharSequenceLowercase() pipe?

114 Views Asked by At

When I try to use these pipes successively, I get the error:

Exception in thread "main" java.lang.IllegalArgumentException: CharSequenceLowercase expects a String, found a class java.lang.StringBuffer

I don't see any pipes available in MALLET to fix this. But it seems to me CharSequenceLowercase() should be able to take in a CharSequence...

1

There are 1 best solutions below

1
On BEST ANSWER

Comment that line and then call

pipeList.add(new TokenSequenceLowercase());

which lower cases the tokens. It looks like the CharSequenceLowerCase pipe cannot accept a StringBuffer. if you look into its code it accepts only String.