I looked up the other TokenFilters that filter tokens, unfortunately all of then default to enablePosIncr=false. I am not sure what the right solution is here? Consistency or correctness? Robert, whats your opinion?
The rest of the patch looks fine, I would only remove the try-catch blocks in the test methods and let the test method declare the exception. It then gets reported by JUnit with a failure automatically.
The question is, the wordset is initialized to be empty if missing. Does it make sense? I would maybe make the types file mandatory, as without the filter makes no sense.