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:06:12 UTC
[jira] [Created] (OPENNLP-549) Inconsistent handling of
lower-/upper- case POS tags in the JWNLDictionary.getLemmas method
Gleb Alexeyev created OPENNLP-549:
-------------------------------------
Summary: 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 attached (the patch assumes Penn TreeBank tags).
--
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
[jira] [Commented] (OPENNLP-549) Inconsistent handling of
lower-/upper- case POS tags in the JWNLDictionary.getLemmas method
Posted by "Aliaksandr Autayeu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-549?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502877#comment-13502877 ]
Aliaksandr Autayeu commented on OPENNLP-549:
--------------------------------------------
The uppercase tags are PTB tags and there the second N should be V. The lowercase tags are JWNL "navr" 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
> Fix For: tools-1.5.3
>
>
> 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
[jira] [Updated] (OPENNLP-549) Inconsistent handling of
lower-/upper- case POS tags in the JWNLDictionary.getLemmas method
Posted by "Gleb Alexeyev (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Resolved] (OPENNLP-549) Inconsistent handling of
lower-/upper- case POS tags in the JWNLDictionary.getLemmas method
Posted by "Aliaksandr Autayeu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENNLP-549?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aliaksandr Autayeu resolved OPENNLP-549.
----------------------------------------
Resolution: Fixed
Fix Version/s: tools-1.5.3
Assignee: Aliaksandr Autayeu
> 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
> Assignee: Aliaksandr Autayeu
> Fix For: tools-1.5.3
>
>
> 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