OpenNLP
  1. OpenNLP
  2. OPENNLP-452

Running the POSTaggerCrossValidator with -ngram argument causes an exception

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: tools-1.5.3
    • Fix Version/s: tools-1.5.3
    • Component/s: POS Tagger
    • Labels:
      None

      Description

      I tried to execute POSTaggerCrossValidator with the -ngram parameter and it caused a UnsupportedOperationException.

      Sometimes it is interesting for some training tools to pre-process the corpus to artifacts before training, for example dictionaries.
      CrossValidationPartitioner.TrainingSampleStream should support the reset operation to allow this functionality.

      Does anybody know why it does not support resetting?

        Activity

        Hide
        William Colen added a comment -

        Implemented 'reset' method

        Show
        William Colen added a comment - Implemented 'reset' method
        Hide
        Joern Kottmann added a comment -

        Fix looks good.

        Show
        Joern Kottmann added a comment - Fix looks good.
        Hide
        Joern Kottmann added a comment -

        When I wrote it I did not thought about the case that some tools need to go multiple times over the training data.

        Show
        Joern Kottmann added a comment - When I wrote it I did not thought about the case that some tools need to go multiple times over the training data.
        Hide
        William Colen added a comment -

        Please review my commit because I am not sure if it would break anything.

        Show
        William Colen added a comment - Please review my commit because I am not sure if it would break anything.

          People

          • Assignee:
            William Colen
            Reporter:
            William Colen
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development