You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2018/01/09 14:33:00 UTC

[jira] [Resolved] (OPENNLP-1180) Use String[] instead of StringList in LanguageModel API

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

Tommaso Teofili resolved OPENNLP-1180.
--------------------------------------
    Resolution: Fixed

> Use String[] instead of StringList in LanguageModel API
> -------------------------------------------------------
>
>                 Key: OPENNLP-1180
>                 URL: https://issues.apache.org/jira/browse/OPENNLP-1180
>             Project: OpenNLP
>          Issue Type: Task
>          Components: language model
>            Reporter: Tommaso Teofili
>            Assignee: Tommaso Teofili
>             Fix For: 1.8.5
>
>
> Current {{LanguageModel}} API uses {{StringList}}, however that's less convenient for easy consumption as one needs to look into StringList and adapt its code to convert arrays or collections of Strings into StringList. Additionally this requires more objects to be created that will be soon discarded by garbage collection e.g. the input StringList for LM#calculateProbability and LM#predictNextTokens.
> I propose to deprecate those methods and add new ones with exactly the same signature but using String[] (or String...) instead.
> Internally StringLists can be kept or not, but that would be an implementation detail and allows to move away from using them more easily.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)