Uploaded image for project: 'OpenNLP'
  1. OpenNLP
  2. OPENNLP-1180

Use String[] instead of StringList in LanguageModel API

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.9.0
    • language model
    • None

    Description

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            teofili Tommaso Teofili
            teofili Tommaso Teofili
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment