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

ASF GitHub Bot commented on OPENNLP-1539:
-----------------------------------------

rzo1 opened a new pull request, #601:
URL: https://github.com/apache/opennlp/pull/601

   ### For all changes:
   - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
        in the commit message?
   
   - [x] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA 
number you are trying to resolve? Pay particular attention to the hyphen "-" 
character.
   
   - [x] Has your PR been rebased against the latest commit within the target 
branch (typically main)?
   
   - [x] Is your initial contribution a single, squashed commit?
   
   ### For code changes:
   - [x] Have you ensured that the full suite of tests is executed via mvn 
clean install at the root opennlp folder?
   - [x] Have you written or updated unit tests to verify your changes?
   - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
   - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file in opennlp folder?
   - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found in opennlp folder?
   
   ### For documentation related changes:
   - [ ] Have you ensured that format looks appropriate for the output in which 
it is rendered?
   
   ### Note:
   
   This is a **Draft** open for feedback on implementing compatibility with 
older PENN-based POS models from Sourceforge. 
   
   




> Introduce parameter for POSTaggerME to configure output POS tag format
> ----------------------------------------------------------------------
>
>                 Key: OPENNLP-1539
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1539
>             Project: OpenNLP
>          Issue Type: Improvement
>          Components: POS Tagger
>    Affects Versions: 2.0.0, 2.1.0, 2.2.0, 2.3.0
>            Reporter: Martin Wiesner
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 2.4.0
>
>
> [Classic (legacy) POS models|https://opennlp.sourceforge.net/models-1.5/] 
> output tags in the [PENN Treebank POS 
> tag|https://www.ling.upenn.edu/courses/Fall_2003/ling001/penn_treebank_pos.html]
>  format.
> The modern UD-based models, however, differ in the [longer output 
> format|https://universaldependencies.org/u/pos/], e.g. "VB" (Penn) vs. "VERB" 
> (UD). Extended (UD) word features are covered here: 
> https://universaldependencies.org/u/feat/index.html
> This difference results in mismatches and will cause existing IT / tests to 
> fail, if executed. Luckily, a mapping table is found here: 
> https://universaldependencies.org/tagset-conversion/en-penn-uposf.html
> To provide compatibility for existing applications and/or use-cases, we need 
> to provide a way to retrieve both POS formats. 
> Aims:
> - Introduce a constructor parameter for POSTaggerME to configure tag format / 
> style: Penn or UD style
> - Implement a mapping between both POS tag formats: UD <==> Penn
> - Update the OpenNLP Manual to explain differences of POS tag format and 
> configuration parameter
> Conceptual idea:
> - {{new POSTaggerME("en")}}  => by _default_: UD format "as is"
> - {{new POSTaggerME("en", POSTagFormat.PENN)}} => by _intention_, here: Penn 
> style
> Benefit: 
> 1. It should be explicit so devs / user see what they will get via 
> {{POSTagFormat}}. Enum values: POSTagFormat.UD, POSTagFormat.PENN, 
> POSTagFormat.DEFAULT
> 2. IT tests can now be formulated to work on both modern and legacy models.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to