You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Piotr Iwaniuk (Created) (JIRA)" <ji...@apache.org> on 2012/04/04 07:55:20 UTC

[jira] [Created] (OPENNLP-492) Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.

Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.
---------------------------------------------------------------------------------------------

                 Key: OPENNLP-492
                 URL: https://issues.apache.org/jira/browse/OPENNLP-492
             Project: OpenNLP
          Issue Type: Bug
          Components: Command Line Interface, POS Tagger
            Reporter: Piotr Iwaniuk
            Priority: Minor


Checking the code with FindBugs warned about calling equals between object of different classes (variable o1 and number 02). It seems to be a sneaky typo. Looking at the rest of the code, it shouldn't change result of comparison, but may reduce performance.

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

        

[jira] [Closed] (OPENNLP-492) Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.

Posted by "Piotr Iwaniuk (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENNLP-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Piotr Iwaniuk closed OPENNLP-492.
---------------------------------

    
> Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-492
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-492
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Command Line Interface, POS Tagger
>            Reporter: Piotr Iwaniuk
>            Assignee: William Colen
>            Priority: Minor
>              Labels: patch, typesystem, typo
>             Fix For: tools-1.5.3
>
>
> Checking the code with FindBugs warned about calling equals between object of different classes (variable o1 and number 02). It seems to be a sneaky typo. Looking at the rest of the code, it shouldn't change result of comparison, but may reduce performance.

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

        

[jira] [Resolved] (OPENNLP-492) Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.

Posted by "William Colen (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENNLP-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Colen resolved OPENNLP-492.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: tools-1.5.3

Fixed the typo. Thanks Piotr Iwaniuk for finding it. Can you please verify if it is OK now and close the issue? Thank you.
                
> Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-492
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-492
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Command Line Interface, POS Tagger
>            Reporter: Piotr Iwaniuk
>            Assignee: William Colen
>            Priority: Minor
>              Labels: patch, typesystem, typo
>             Fix For: tools-1.5.3
>
>
> Checking the code with FindBugs warned about calling equals between object of different classes (variable o1 and number 02). It seems to be a sneaky typo. Looking at the rest of the code, it shouldn't change result of comparison, but may reduce performance.

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

        

[jira] [Assigned] (OPENNLP-492) Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.

Posted by "William Colen (Assigned) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENNLP-492?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

William Colen reassigned OPENNLP-492:
-------------------------------------

    Assignee: William Colen
    
> Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-492
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-492
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Command Line Interface, POS Tagger
>            Reporter: Piotr Iwaniuk
>            Assignee: William Colen
>            Priority: Minor
>              Labels: patch, typesystem, typo
>
> Checking the code with FindBugs warned about calling equals between object of different classes (variable o1 and number 02). It seems to be a sneaky typo. Looking at the rest of the code, it shouldn't change result of comparison, but may reduce performance.

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

        

[jira] [Commented] (OPENNLP-492) Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.

Posted by "Piotr Iwaniuk (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENNLP-492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13246057#comment-13246057 ] 

Piotr Iwaniuk commented on OPENNLP-492:
---------------------------------------

Here is a diff:

Index: opennlp-tools/src/main/java/opennlp/tools/cmdline/postag/POSTaggerFineGrainedReportListener.java
===================================================================
--- opennlp-tools/src/main/java/opennlp/tools/cmdline/postag/POSTaggerFineGrainedReportListener.java	(wersja 1309183)
+++ opennlp-tools/src/main/java/opennlp/tools/cmdline/postag/POSTaggerFineGrainedReportListener.java	(kopia robocza)
@@ -649,7 +649,7 @@
     public SortedSet<String> getTokensOrderedByFrequency() {
       SortedSet<String> toks = new TreeSet<String>(new Comparator<String>() {
         public int compare(String o1, String o2) {
-          if (o1.equals(02)) {
+          if (o1.equals(o2)) {
             return 0;
           }
           int e1 = 0, e2 = 0;
                
> Method getTokensOrderedByFrequency in POSTaggerFineGrainedReportListener probably has a typo.
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-492
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-492
>             Project: OpenNLP
>          Issue Type: Bug
>          Components: Command Line Interface, POS Tagger
>            Reporter: Piotr Iwaniuk
>            Priority: Minor
>              Labels: patch, typesystem, typo
>
> Checking the code with FindBugs warned about calling equals between object of different classes (variable o1 and number 02). It seems to be a sneaky typo. Looking at the rest of the code, it shouldn't change result of comparison, but may reduce performance.

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