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

The Training API code for Document Categorization is outdated in manual

    XMLWordPrintableJSON

Details

    Description

      The Training API example code at https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html in the section dealing with TokenNameFinder training  incorrect. The current code sample includes:

      try (dataIn = new FileInputStream("en-sentiment.train")) {
        ObjectStream<String> lineStream =
      		new PlainTextByLineStream(dataIn, 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-1319OPENNLP-1345, and OPENNLP-1346 among others.

      Attachments

        Issue Links

          Activity

            People

              mawiesne Martin Wiesner
              sprhodes Phillip Rhodes
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: