You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Gleb Alexeyev (JIRA)" <ji...@apache.org> on 2012/11/16 12:08:12 UTC

[jira] [Updated] (OPENNLP-549) Inconsistent handling of lower-/upper- case POS tags in the JWNLDictionary.getLemmas method

     [ https://issues.apache.org/jira/browse/OPENNLP-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gleb Alexeyev updated OPENNLP-549:
----------------------------------

    Description: 
JWNLDictionary.getLemmas method has a code that maps string-valued POS tags to net.didion.jwnl.data.POS instances, and this code clearly has a bug (for example, it maps tags starting with "N" both to POS.NOUN and POS.VERB). Please see the patch below (the patch assumes Penn TreeBank tags).


Index: src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java
===================================================================
--- src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java	(revision 1410284)
+++ src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java	(working copy)
@@ -84,10 +84,10 @@
       if (tag.startsWith("N") || tag.startsWith("n")) {
         pos = POS.NOUN;
       }
-      else if (tag.startsWith("N") || tag.startsWith("v")) {
+      else if (tag.startsWith("V") || tag.startsWith("v")) {
         pos = POS.VERB;
       }
-      else if (tag.startsWith("J") || tag.startsWith("a")) {
+      else if (tag.startsWith("J") || tag.startsWith("j")) {
         pos = POS.ADJECTIVE;
       }
       else if (tag.startsWith("R") || tag.startsWith("r")) {


  was:JWNLDictionary.getLemmas method has a code that maps string-valued POS tags to net.didion.jwnl.data.POS instances, and this code clearly has a bug (for example, it maps tags starting with "N" both to POS.NOUN and POS.VERB). Please see the patch attached (the patch assumes Penn TreeBank tags).

    
> Inconsistent handling of lower-/upper- case POS tags in the JWNLDictionary.getLemmas method
> -------------------------------------------------------------------------------------------
>
>                 Key: OPENNLP-549
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-549
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: Coref
>    Affects Versions: tools-1.5.2-incubating
>            Reporter: Gleb Alexeyev
>
> JWNLDictionary.getLemmas method has a code that maps string-valued POS tags to net.didion.jwnl.data.POS instances, and this code clearly has a bug (for example, it maps tags starting with "N" both to POS.NOUN and POS.VERB). Please see the patch below (the patch assumes Penn TreeBank tags).
> Index: src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java
> ===================================================================
> --- src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java	(revision 1410284)
> +++ src/main/java/opennlp/tools/coref/mention/JWNLDictionary.java	(working copy)
> @@ -84,10 +84,10 @@
>        if (tag.startsWith("N") || tag.startsWith("n")) {
>          pos = POS.NOUN;
>        }
> -      else if (tag.startsWith("N") || tag.startsWith("v")) {
> +      else if (tag.startsWith("V") || tag.startsWith("v")) {
>          pos = POS.VERB;
>        }
> -      else if (tag.startsWith("J") || tag.startsWith("a")) {
> +      else if (tag.startsWith("J") || tag.startsWith("j")) {
>          pos = POS.ADJECTIVE;
>        }
>        else if (tag.startsWith("R") || tag.startsWith("r")) {

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