|
[
Permlink
| « Hide
]
Nicolas Lalevée added a comment - 25/Jan/08 10:17 AM
here is my workaround until it is fixed into the Lucene API :
Ugh, I missed that we lost this when we switched to JFlex (
Attached patch fixing this. I just added a new Constants.java that has static constants defined, and added a compile-time testcase to assert that these constants remain publicly accessible.
I will commit in a day or two. Why not just add them on to the StandardTokenizer class?
For the WikipediaTokenizer (roughly based on the StandardTokenizer), I just added them to the WikipediaTokenizer wrapper class. However, I did leave the StandardTokenizer ones as they were. So, we should probably do the appropriate thing there, too. Good! I'll take that approach, and update WikipediaTokenizer too.
New patch attached, that also exposes the token types for WikipediaTokenizer. I'll commit in a day or two.
I just committed this. Thanks for opening this Nicolas!
Backported fix to 2.3.2.
The original tokenImage String array from 2.2 is still not available in this patch, they are still in the Impl. These are the values returned from Token.type(), so should they not be visible as well as the static ints?
You're right. I'll put that back as well, and port to 2.3.2.
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||