Skip to content

Commit

Permalink
Remove the biaffine parser (#59)
Browse files Browse the repository at this point in the history
The biaffine parser is now in the separate `spacy-biaffine-parser`
package: https://github.com/explosion/spacy-biaffine-parser
  • Loading branch information
danieldk committed Apr 23, 2024
1 parent 63a0b0d commit 283e1d8
Show file tree
Hide file tree
Showing 32 changed files with 7 additions and 3,551 deletions.
34 changes: 7 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,33 +189,6 @@ maxout_pieces = 2
The NER version does not currently support sentence boundaries, but it would be
easy to extend using a `B-SENT` entity type.

### Biaffine parser

A biaffine dependency parser, similar to that proposed in [Deep Biaffine
Attention for Neural Dependency Parsing](Deep Biaffine Attention for Neural
Dependency Parsing) (Dozat & Manning, 2016). The parser consists of two parts:
an edge predicter and an edge labeler. For example:

```ini
[components.experimental_arc_predicter]
factory = "experimental_arc_predicter"

[components.experimental_arc_labeler]
factory = "experimental_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`:

```ini
[training]
annotating_components = ["senter"]
```

The [biaffine parser sample project](projects/biaffine_parser) provides an
example biaffine parser pipeline.

### Span Finder

The SpanFinder is a new experimental component that identifies span boundaries
Expand Down Expand Up @@ -393,6 +366,13 @@ sizes = [1, 2, 3]

Note that all the suggester functions are registered in `@misc`.

## Former components

- The edit tree lemmatizer is
[in spaCy since version 3.3](https://spacy.io/usage/v3-3#trainable-lemmatizer).
- The biaffine parser has moved into the standalone package
[`spacy-biaffine-parser`](https://github.com/explosion/spacy-biaffine-parser).

## Bug reports and issues

Please report bugs in the
Expand Down
45 changes: 0 additions & 45 deletions projects/biaffine_parser/README.md

This file was deleted.

180 changes: 0 additions & 180 deletions projects/biaffine_parser/configs/base-config.cfg

This file was deleted.

68 changes: 0 additions & 68 deletions projects/biaffine_parser/project.yml

This file was deleted.

1 change: 0 additions & 1 deletion projects/biaffine_parser/requirements.txt

This file was deleted.

4 changes: 0 additions & 4 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,10 @@ install_requires =

[options.entry_points]
spacy_architectures =
spacy-experimental.Bilinear.v1 = spacy_experimental.biaffine_parser.bilinear:build_bilinear
spacy-experimental.PairwiseBilinear.v1 = spacy_experimental.biaffine_parser.pairwise_bilinear:build_pairwise_bilinear
spacy-experimental.SpanFinder.v1 = spacy_experimental.span_finder.span_finder_model:build_finder_model
spacy-experimental.Coref.v1 = spacy_experimental.coref.coref_model:build_coref_model
spacy-experimental.SpanResolver.v1 = spacy_experimental.coref.span_resolver_model:build_span_resolver
spacy_factories =
experimental_arc_labeler = spacy_experimental.biaffine_parser.arc_labeler:make_arc_labeler
experimental_arc_predicter = spacy_experimental.biaffine_parser.arc_predicter:make_arc_predicter
experimental_char_tagger_tokenizer = spacy_experimental.char_tokenizer.char_tagger_tokenizer:make_char_tagger_tokenizer
experimental_char_ner_tokenizer = spacy_experimental.char_tokenizer.char_ner_tokenizer:make_char_ner_tokenizer
experimental_span_finder = spacy_experimental.span_finder.span_finder_component:make_span_finder
Expand Down
21 changes: 0 additions & 21 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,6 @@ def build_extensions(self):

def setup_package():
ext_modules = [
Extension(
"spacy_experimental.biaffine_parser.arc_predicter",
["spacy_experimental/biaffine_parser/arc_predicter.pyx"],
language="c++",
include_dirs=[numpy.get_include()],
extra_compile_args=["-std=c++11"],
),
Extension(
"spacy_experimental.biaffine_parser.arc_labeler",
["spacy_experimental/biaffine_parser/arc_labeler.pyx"],
language="c++",
include_dirs=[numpy.get_include()],
extra_compile_args=["-std=c++11"],
),
Extension(
"spacy_experimental.biaffine_parser.mst",
["spacy_experimental/biaffine_parser/mst.pyx"],
language="c++",
include_dirs=[numpy.get_include()],
extra_compile_args=["-std=c++11"],
),
Extension(
"spacy_experimental.char_tokenizer.char_tagger_tokenizer",
["spacy_experimental/char_tokenizer/char_tagger_tokenizer.pyx"],
Expand Down
Loading

0 comments on commit 283e1d8

Please sign in to comment.