lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Rowe (JIRA)" <>
Subject [jira] [Commented] (LUCENE-6103) StandardTokenizer doesn't tokenize word:word
Date Tue, 09 Dec 2014 19:42:13 GMT


Steve Rowe commented on LUCENE-6103:

bq. Yes, I figured it will be down to some Unicode rules. Can you give a rationale for this,
mainly out of curiosity?

The comment in the {{MidLetter}} list says it's for Swedish.  If you look at the [revision
history at the bottom of the page|], the
colon was temporarily removed from {{MidLetter}} in between Unicode versions 6.2 and 6.3,
but then put back before 6.3 was released (I guess this should be read from the bottom upward):

* Restored colon and equivalents (removed in previous draft).
* Removed colon from MidLetter, so that it is no longer contained within words. Handling of
colon for word boundary determination in Swedish would be done by tailoring, instead – for
example by a Swedish localization definition in CLDR.

I guess the Swedish contingent among Unicoders is strong?

Not a Unicode expert, but I'd assume just like you wouldn't want English words to not-break
on Hebrew Punctuation Gershayim (e.g. Test"Word is actually 2 tokens and מנכ"לים is
one), maybe this rule is meant for specific scenarios and not for the general use case?

StandardTokenizer is not intended to be English-centric - instead it should do something reasonable
with any text.

On another note, any type of Gershayim should be preserved within Hebrew words, not only U+05F4.
This is mainly because keyboards and editors used produce the standard " character in most
cases. I had a chat with Robert a while back where he said that's the case, I'm just making
sure you didn't follow the specs to the letter in that regard...

I did follow the specs to the letter, and it does the right thing:

Rules [WB7b and WB7c|] forbids breaks around the
ASCII double quote character, but only when surrounded by Hewbrew letters.

> StandardTokenizer doesn't tokenize word:word
> --------------------------------------------
>                 Key: LUCENE-6103
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/analysis
>    Affects Versions: 4.9
>            Reporter: Itamar Syn-Hershko
>            Assignee: Steve Rowe
> StandardTokenizer (and by result most default analyzers) will not tokenize word:word
and will preserve it as one token. This can be easily seen using Elasticsearch's analyze API:
> localhost:9200/_analyze?tokenizer=standard&text=word%20word:word
> If this is the intended behavior, then why? I can't really see the logic behind it.
> If not, I'll be happy to join in the effort of fixing this.

This message was sent by Atlassian JIRA

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

View raw message