Skip to content

Let the bottom-up parsers use a caller-supplied POSTagger and Chunker via a builder #1476

Closed

Description

@krickert

The chunking and tree insert parsers always build a POSTaggerME and a ChunkerME from the tagger and chunker models stored in the ParserModel. An application cannot parse with its own tagger or chunker, for example a POS tagger trained on domain text, without training a new parser model.

Both parsers should get a public constructor that takes a POSTagger and a Chunker next to the ParserModel. The build, attach and check models and the head rules still come from the model, and the model's own tagger and chunker are not constructed. ParserFactory.builder(model) should return a ParserBuilder with tagger(), chunker(), beamSize() and advancePercentage(), falling back to the model's components for anything not set, and ParserFactory.create should go through it so the parser type dispatch exists once.

Arguments should be checked at the public boundary with IllegalArgumentException: a null model, tagger, chunker or head rules, a beam size below 1, and an advance percentage outside (0, 1].

Activity

  1. added 6 commits that reference this issue on Oct 11, 2026
  2. added a commit that references this issue on Oct 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions