[ 
https://issues.apache.org/jira/browse/LUCENE-5356?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13838022#comment-13838022
 ] 

Dawid Weiss commented on LUCENE-5356:
-------------------------------------

A quick look at the patch:
{code}
   /** Schema attribute. */
-  @Deprecated
   public static final String DICTIONARY_SCHEMA_ATTRIBUTE = "dictionary";
{code}

We should not un-deprecate this property, especially that its new meaning is 
different to what it was before. The custom dictionary should be a separate 
property, with a new semantics.

All the logic in MorfologikLemmatizer seems awkward to me:
{code}
+    @Override
+    public Iterator<WordData> iterator() {
+        if (delegate.size() == 1) {
+            return delegate.get(0).iterator();
+        } else {
+            throw new RuntimeException("No iteration over compound stemmer 
forms: "
+                    + Arrays.toString(delegate.toArray()));
+        }
+    }
{code}

How can this ever be != 1 if the only place you add a delegate in is in the 
constructor?

> more generic lucene-morfologik integration
> ------------------------------------------
>
>                 Key: LUCENE-5356
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5356
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/analysis
>    Affects Versions: 4.6
>            Reporter: Michal Hlavac
>            Assignee: Dawid Weiss
>            Priority: Minor
>              Labels: newbie, patch
>             Fix For: 5.0, 4.7
>
>         Attachments: LUCENE-5356.patch
>
>
> I have little proposal for morfologik lucene module. Current module is 
> tightly coupled with polish DICTIONARY enumeration.
> But other people (like me) can build own dictionaries to FSA and use it with 
> lucene. 
> You can find proposal in attachment and also example usage in analyzer 
> (SlovakLemmaAnalyzer).
> It uses dictionary property as String resource from classpath, not 
> enumeration.
> One change is, that dictionary variable must be set in MofologikFilterFactory 
> (no default value).



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to