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

Aliaksandr Autayeu commented on OPENNLP-544:
--------------------------------------------

Chris, thank you for the patch. It looks interesting and I gave it a look. I'd 
say a couple of things, would you mind commenting?

1) I'd say it's not nice if interface depends on implementation:
+       /**
+        * @see Span#compareTo
+        */
+       int compareTo(Span s);

2) I'd say that Javadocs should move from implementation to interface.

3) I'd say that int compareTo(Span s) is really from Comparable and a better 
solution might be to inherit, rather than copy. May be like this: public 
interface Spannable extends Comparable<Spannable> { ...

What do you think?
                
> 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: 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