lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (JIRA)" <>
Subject [jira] [Updated] (LUCENE-6874) WhitespaceTokenizer should tokenize on NBSP
Date Thu, 12 Nov 2015 12:50:11 GMT


Uwe Schindler updated LUCENE-6874:
    Attachment: LUCENE-6874-chartokenizer.patch

LUCENE-6874-chartokenizer.patch is now the merged patch:
- Contains the WhitespaceTokenizerFactory from [~dsmiley], but without maxTokenLength (was
specific to jflex)
- Adds the tests by [~steve_rowe]
- The ICUWhitespaceTokenizer is gone (as [~rcmuir] said)
- Modifies the ALG file to exclude this tokenizer. I have no yet tested the ALG file. I also
did no performance test up to now.

I like the new solution more than the Jflex-based tokenizer, because it is smaller and maybe
also faster (not yet tested). Using JFlex for this is not really a good idea, because the
tokenization algorithm is very simple. CharTokenizer is the better match for that, thoroughly

> WhitespaceTokenizer should tokenize on NBSP
> -------------------------------------------
>                 Key: LUCENE-6874
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: David Smiley
>            Priority: Minor
>         Attachments: LUCENE-6874-chartokenizer.patch, LUCENE-6874-jflex.patch, LUCENE-6874.patch,
LUCENE_6874_jflex.patch, icu-datasucker.patch, unicode-ws-tokenizer.patch, unicode-ws-tokenizer.patch,
> WhitespaceTokenizer uses [Character.isWhitespace |]
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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message