Skip to content

explosion/spacy-biaffine-parser

Repository files navigation

spacy-biaffine-parser: Biaffine parser for spaCy

tests pypi Version

This package provides a biaffine dependency parser, similar to that proposed in Deep Biaffine Attention for Neural Dependency Parsing (Dozat & Manning, 2016).

Installation

Install with pip:

python -m pip install -U pip setuptools wheel
python -m pip install spacy-biaffine-parser

Usage

The parser consists of two pipes: an edge predicter and an edge labeler. For example:

[components.arc_predicter]
factory = "arc_predicter"

[components.arc_labeler]
factory = "arc_labeler"

The arc predicter requires that a previous component (such as senter) sets sentence boundaries during training. Therefore, such a component must be added to annotating_components:

[training]
annotating_components = ["senter"]

The biaffine parser sample project provides an example biaffine parser pipeline.

Bug reports and issues

Please report bugs in the spaCy issue tracker or open a new thread on the discussion board for other issues.