lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Uwe Schindler (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-3731) Create a analysis/uima module for UIMA based tokenizers/analyzers
Date Fri, 03 Feb 2012 15:27:53 GMT

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

Uwe Schindler commented on LUCENE-3731:
---------------------------------------

Hi,

{code}
+      clearAttributes();
+      AnnotationFS next = iterator.next();
+      termAttr.setEmpty();
+      termAttr.append(next.getCoveredText());
+      termAttr.setLength(next.getCoveredText().length());
{code}

As you clear the attributes already, the length of termAttr is 0, so setEmpty is not needed.
termAttr.setLength() is also not useful, as append will initialize the length already. All
you need is termAttr.append(next.getCoveredText());

Uwe
                
> Create a analysis/uima module for UIMA based tokenizers/analyzers
> -----------------------------------------------------------------
>
>                 Key: LUCENE-3731
>                 URL: https://issues.apache.org/jira/browse/LUCENE-3731
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: modules/analysis
>            Reporter: Tommaso Teofili
>            Assignee: Tommaso Teofili
>             Fix For: 3.6, 4.0
>
>         Attachments: LUCENE-3731.patch
>
>
> As discussed in SOLR-3013 the UIMA Tokenizers/Analyzer should be refactored out in a
separate module (modules/analysis/uima) as they can be used in plain Lucene. Then the solr/contrib/uima
will contain only the related factories.

--
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


Mime
View raw message