You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Ippei UKAI (JIRA)" <ji...@apache.org> on 2012/05/22 04:07:41 UTC
[jira] [Created] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Ippei UKAI created LUCENE-4072:
----------------------------------
Summary: CharFilter that Unicode-normalizes input
Key: LUCENE-4072
URL: https://issues.apache.org/jira/browse/LUCENE-4072
Project: Lucene - Java
Issue Type: New Feature
Components: modules/analysis
Reporter: Ippei UKAI
I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
The implementation is available at following repository:
https://github.com/ippeiukai/ICUNormalizer2CharFilter
Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ippei UKAI updated LUCENE-4072:
-------------------------------
Attachment: ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ippei UKAI updated LUCENE-4072:
-------------------------------
Attachment: DebugCode.txt
How I debugged for a reference.
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: DebugCode.txt, LUCENE-4072.patch, ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Comment Edited] (LUCENE-4072) CharFilter that
Unicode-normalizes input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283977#comment-13283977 ]
Ippei UKAI edited comment on LUCENE-4072 at 5/26/12 1:25 PM:
-------------------------------------------------------------
I've found a problem:
In ICUNormalizer2CharFilter#recordOffsetDiff(int,int), the positive diff case should look like following.
<pre>
addOffCorrectMap(charCount + Math.min(1, outputLength), cumuDiff + diff);
</pre>
Hopefully, there won't be more.
I do grant license to ASF to include the above line in ASF works (as per the Apache License ยง5)
was (Author: ippei):
I've found a problem:
In ICUNormalizer2CharFilter#recordOffsetDiff(int,int), the positive diff case should look like following.
<pre>
addOffCorrectMap(charCount + Math.min(1, outputLength), cumuDiff + diff);
</pre>
Maybe there are more...
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: DebugCode.txt, LUCENE-4072.patch, ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283977#comment-13283977 ]
Ippei UKAI commented on LUCENE-4072:
------------------------------------
I've found a problem:
In ICUNormalizer2CharFilter#recordOffsetDiff(int,int), the positive diff case should look like following.
<pre>
addOffCorrectMap(charCount + Math.min(1, outputLength), cumuDiff + diff);
</pre>
Maybe there are more...
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: LUCENE-4072.patch, ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281376#comment-13281376 ]
Ippei UKAI commented on LUCENE-4072:
------------------------------------
Robert,
The zipped copy of the repository is attached and licensed to ASF for inclusion.
Thanks!
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Ippei UKAI (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13283943#comment-13283943 ]
Ippei UKAI commented on LUCENE-4072:
------------------------------------
I've backported your additional test case of random string and reproduced the problem.
However, I haven't managed to pin point the problem so far. Having no clue coming out of AssertionError, attacking LUCENE-3900 first might be more productive.
This final offset thing looks like a common occurrence among CharFilters (re LUCENE-3820 LUCENE-3971) but I'm yet to find a common theme in them.
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: LUCENE-4072.patch, ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280905#comment-13280905 ]
Robert Muir commented on LUCENE-4072:
-------------------------------------
Hello, if you are willing to contribute this under the Apache license (http://www.apache.org/licenses/LICENSE-2.0.html), would
you mind uploading a .zip file of your codebase (git has a button to create it), and check the box "Grant license to ASF for inclusion in ASF works"
when doing the upload?
Then I can help turn it into a patch. Thanks again!
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Updated] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Muir updated LUCENE-4072:
--------------------------------
Attachment: LUCENE-4072.patch
attached is the filter, turned into a patch.
however, I added an additional random test and it currently fails... will look into this more.
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
> Attachments: LUCENE-4072.patch, ippeiukai-ICUNormalizer2CharFilter-4752cad.zip
>
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org
[jira] [Commented] (LUCENE-4072) CharFilter that Unicode-normalizes
input
Posted by "Robert Muir (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/LUCENE-4072?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13280687#comment-13280687 ]
Robert Muir commented on LUCENE-4072:
-------------------------------------
This looks cool: it looked tricky to me to implement that iterative normalization api, I'm glad you tackled it :)
Its a good idea, for some tokenizers like Ngrams etc you really need normalization as a charfilter.
I'll see if i can help with the integration.
> CharFilter that Unicode-normalizes input
> ----------------------------------------
>
> Key: LUCENE-4072
> URL: https://issues.apache.org/jira/browse/LUCENE-4072
> Project: Lucene - Java
> Issue Type: New Feature
> Components: modules/analysis
> Reporter: Ippei UKAI
>
> I'd like to contribute a CharFilter that Unicode-normalizes input with ICU4J.
> The benefit of having this process as CharFilter is that tokenizer can work on normalised text while offset-correction ensuring fast vector highlighter and other offset-dependent features do not break.
> The implementation is available at following repository:
> https://github.com/ippeiukai/ICUNormalizer2CharFilter
> Unfortunately this is my unpaid side-project and cannot spend much time to merge my work to Lucene to make appropriate patch. I'd appreciate it if anyone could give it a go. I'm happy to relicense it to whatever that meets your needs.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org