You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2022/10/25 19:01:16 UTC
[GitHub] [lucene-solr] Trey314159 commented on a diff in pull request #187: LUCENE-7785: Move dictionary for Ukrainan analyzer to external dependency
Trey314159 commented on code in PR #187:
URL: https://github.com/apache/lucene-solr/pull/187#discussion_r1004863464
##########
lucene/analysis/morfologik/src/java/org/apache/lucene/analysis/uk/UkrainianMorfologikAnalyzer.java:
##########
@@ -107,11 +107,18 @@ public UkrainianMorfologikAnalyzer(CharArraySet stopwords, CharArraySet stemExcl
@Override
protected Reader initReader(String fieldName, Reader reader) {
NormalizeCharMap.Builder builder = new NormalizeCharMap.Builder();
+ // different apostrophes
builder.add("\u2019", "'");
+ builder.add("\u0218", "'");
builder.add("\u02BC", "'");
+ builder.add("`", "'");
+ builder.add("ยด", "'");
+ // ignored characters
builder.add("\u0301", "");
- NormalizeCharMap normMap = builder.build();
+ builder.add("\u00AD", "");
+ builder.add("\uFEFF", "");
Review Comment:
Just stumbled across this dicussion today. I'm the Wikimedia guy that arysin linked to above. And while it is _waaaaay_ to late, I just wanted to point out that while U+FEFF is used as the byte order mark at the beginning of a text stream, it is [also used](https://en.wikipedia.org/wiki/Byte_order_mark#Usage) as a "zero-width non-breaking space" within a text. That use was deprecated as of Unicode 3.2, but it is still quite common in practice on lots of Wikipedias. ICU normalization converts it to the empty string, which is how it usually gets handled on the wikis where we have had the chance to customize the analyzers, though that requires being able to open them up, so to speak.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org