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

Chris Fournier edited comment on OPENNLP-544 at 11/8/12 6:20 PM:
-----------------------------------------------------------------

I went ahead and made the SpannableApplied patch, which includes both the 
Spannable pacth and also refactors the rest of opennlp-tool to utilize 
Spannable:

- opennlp.tools.coref.mention.Mention and opennlp.tools.parser.Constituent now 
extend Span, but also still contain Spannable object internally in some cases 
(opennlp.tools.parser.Parse also contains Spannable objects, but does not 
extend a Span object);
- Method signatures accept and return Spannable;
- Generics utilize Spannable; and
- Arrays are of Spannable objects.

All 278 of opennlp-tools's unit tests pass using this patch (which also 
refactors the tests to use the Spannable interface).

This improvement it not necessarily needed, but, it could prove useful and 
third parties (e.g., myself!) would appreciate the interface.  It is also 
probably a bad idea to add it and then not use it in opennlp itself (if it was 
to be accepted).
                
      was (Author: cfournie):
    I went ahead and made the SpannableApplied patch, which includes both the 
Spannable pacth and also refactors the rest of opennlp-tool to utilize 
Spannable:

- opennlp.tools.coref.mention.Mention and opennlp.tools.parser.Constituent now 
extend Span, but also still contain Spannable object internally in some cases 
(opennlp.tools.parser.Parse also contains Spannable objects, but is not a 
Spannable object);
- Method signatures accept and return Spannable;
- Generics utilize Spannable; and
- Arrays are of Spannable objects.

All 278 of opennlp-tools's unit tests pass using this patch (which also 
refactors the tests to use the Spannable interface).

This improvement it not necessarily needed, but, it could prove useful and 
third parties (e.g., myself!) would appreciate the interface.  It is also 
probably a bad idea to add it and then not use it in opennlp itself (if it was 
to be accepted).
                  
> Added an interface for opennlp.tools.util.Span
> ----------------------------------------------
>
>                 Key: OPENNLP-544
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-544
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: Tokenizer
>    Affects Versions: tools-1.5.3
>            Reporter: Chris Fournier
>            Priority: Trivial
>              Labels: newbie, patch
>             Fix For: tools-1.5.3
>
>         Attachments: SpannableApplied_OPENNLP-544-1.5.3.patch, 
> Spannable_OPENNLP-544-1.5.3.patch
>
>
> Added an interface, opennlp.tools.util.Spannable, to allow for the creation 
> of objects that can span text and fulfill the same functionality as Span 
> without necessarily needing to extend it (currently implemented only by 
> opennlp.tools.util.Span).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to