[ https://issues.apache.org/jira/browse/LUCENE-6874?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15001257#comment-15001257 ]
Uwe Schindler commented on LUCENE-6874: --------------------------------------- Cool! So my idea would be to write a small tool in the analysis/commons/src/tools module that uses the current jflex JAR file in classpath and extract the values for the bitset from the JFlex JAR file by accessing this class: https://github.com/jflex-de/jflex/blob/master/jflex/src/main/java/jflex/unicode/data/Unicode_6_3.java In my opinion this would be more elegant than creating a huge jflex UnicodeWhitespaceTokenizer in a separate submodule, if we could just just a codegenerator that produces a BitSet to be used in a CharTokenizer subclass. CharTokenizer is thoroughly tested, so just feeding it with a bitset would be my preference. Would this work? > WhitespaceTokenizer should tokenize on NBSP > ------------------------------------------- > > Key: LUCENE-6874 > URL: https://issues.apache.org/jira/browse/LUCENE-6874 > Project: Lucene - Core > Issue Type: Improvement > Components: modules/analysis > Reporter: David Smiley > Priority: Minor > Attachments: LUCENE-6874-jflex.patch, LUCENE-6874.patch, > LUCENE_6874_jflex.patch > > > WhitespaceTokenizer uses [Character.isWhitespace > |http://docs.oracle.com/javase/8/docs/api/java/lang/Character.html#isWhitespace-int-] > to decide what is whitespace. Here's a pertinent excerpt: > bq. It is a Unicode space character (SPACE_SEPARATOR, LINE_SEPARATOR, or > PARAGRAPH_SEPARATOR) but is not also a non-breaking space ('\u00A0', > '\u2007', '\u202F') > Perhaps Character.isWhitespace should have been called > isLineBreakableWhitespace? > I think WhitespaceTokenizer should tokenize on this. I am aware it's easy to > work around but why leave this trap in by default? -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org