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

The Training API code for Sentence Detection is outdated in manual

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The Training API example code at https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html in the section on Sentence Detection training is incorrect. The current code sample is:

      ObjectStream<String> lineStream =
        new PlainTextByLineStream(new FileInputStream("en-sent.train"), StandardCharsets.UTF_8);
       

      But PlainTextByLineStream no longer takes an InputStream as the first argument to its constructor. It now requires an InputStreamFactory.

      NOTE: this same pattern reappears in multiple places in the current manual. See also, OPENNLP-1319

      Attachments

        Issue Links

        Activity

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

          People

            Unassigned Unassigned
            sprhodes Phillip Rhodes
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment