Skip to main content

spacy-experimental: Cutting-edge experimental spaCy components and features

This package includes experimental components and features for spaCy v3.x, for example model architectures, pipeline components and utilities.

Azure Pipelines pypi Version

Installation

Install with pip:

python -m pip install -U pip setuptools wheel
python -m pip install spacy-experimental

Using spacy-experimental

Components and features may be modified or removed in any release, so always specify the exact version as a package requirement if you're experimenting with a particular component, e.g.:

spacy-experimental==0.147.0

Then you can add the experimental components to your config or import from spacy_experimental:

[components.experimental_edit_tree_lemmatizer]
factory = "experimental_edit_tree_lemmatizer"

Components

Edit tree lemmatizer

[components.experimental_edit_tree_lemmatizer]
factory = "experimental_edit_tree_lemmatizer"
# token attr to use as backoff with the predicted trees are not applicable; null to leave unset
backoff = "orth"
# prune trees that are applied less than this frequency in the training data
min_tree_freq = 2
# whether to overwrite existing lemma annotation
overwrite = false
scorer = {"@scorers":"spacy.lemmatizer_scorer.v1"}
# try to apply at most the k most probable edit trees
top_k = 1

Trainable character-based tokenizers

Two trainable tokenizers represent tokenization as a sequence tagging problem over individual characters and use the existing spaCy tagger and NER architectures to perform the tagging.

In the spaCy pipeline, a simple "pretokenizer" is applied as the pipeline tokenizer to split each doc into individual characters and the trainable tokenizer is a pipeline component that retokenizes the doc. The pretokenizer needs to be configured manually in the config or with spacy.blank():

nlp = spacy.blank(
    "en",
    config={
        "nlp": {
            "tokenizer": {"@tokenizers": "spacy-experimental.char_pretokenizer.v1"}
        }
    },
)

The two tokenizers currently reset any existing tag or entity annotation respectively in the process of retokenizing.

Character-based tagger tokenizer

In the tagger version experimental_char_tagger_tokenizer, the tagging problem is represented internally with character-level tags for token start (T), token internal (I), and outside a token (O). This representation comes from Elephant: Sequence Labeling for Word and Sentence Segmentation (Evang et al., 2013).

This is a sentence.
TIIIOTIOTOTIIIIIIIT

With the option annotate_sents, S replaces T for the first token in each sentence and the component predicts both token and sentence boundaries.

This is a sentence.
SIIIOTIOTOTIIIIIIIT

A config excerpt for experimental_char_tagger_tokenizer:

[nlp]
pipeline = ["experimental_char_tagger_tokenizer"]
tokenizer = {"@tokenizers":"spacy-experimental.char_pretokenizer.v1"}

[components]

[components.experimental_char_tagger_tokenizer]
factory = "experimental_char_tagger_tokenizer"
annotate_sents = true
scorer = {"@scorers":"spacy-experimental.tokenizer_senter_scorer.v1"}

[components.experimental_char_tagger_tokenizer.model]
@architectures = "spacy.Tagger.v1"
nO = null

[components.experimental_char_tagger_tokenizer.model.tok2vec]
@architectures = "spacy.Tok2Vec.v2"

[components.experimental_char_tagger_tokenizer.model.tok2vec.embed]
@architectures = "spacy.MultiHashEmbed.v2"
width = 128
attrs = ["ORTH","LOWER","IS_DIGIT","IS_ALPHA","IS_SPACE","IS_PUNCT"]
rows = [1000,500,50,50,50,50]
include_static_vectors = false

[components.experimental_char_tagger_tokenizer.model.tok2vec.encode]
@architectures = "spacy.MaxoutWindowEncoder.v2"
width = 128
depth = 4
window_size = 4
maxout_pieces = 2

Character-based NER tokenizer

In the NER version, each character in a token is part of an entity:

T	B-TOKEN
h	I-TOKEN
i	I-TOKEN
s	I-TOKEN
 	O
i	B-TOKEN
s	I-TOKEN
	O
a	B-TOKEN
 	O
s	B-TOKEN
e	I-TOKEN
n	I-TOKEN
t	I-TOKEN
e	I-TOKEN
n	I-TOKEN
c	I-TOKEN
e	I-TOKEN
.	B-TOKEN

A config excerpt for experimental_char_ner_tokenizer:

[nlp]
pipeline = ["experimental_char_ner_tokenizer"]
tokenizer = {"@tokenizers":"spacy-experimental.char_pretokenizer.v1"}

[components]

[components.experimental_char_ner_tokenizer]
factory = "experimental_char_ner_tokenizer"
scorer = {"@scorers":"spacy-experimental.tokenizer_scorer.v1"}

[components.experimental_char_ner_tokenizer.model]
@architectures = "spacy.TransitionBasedParser.v2"
state_type = "ner"
extra_state_tokens = false
hidden_width = 64
maxout_pieces = 2
use_upper = true
nO = null

[components.experimental_char_ner_tokenizer.model.tok2vec]
@architectures = "spacy.Tok2Vec.v2"

[components.experimental_char_ner_tokenizer.model.tok2vec.embed]
@architectures = "spacy.MultiHashEmbed.v2"
width = 128
attrs = ["ORTH","LOWER","IS_DIGIT","IS_ALPHA","IS_SPACE","IS_PUNCT"]
rows = [1000,500,50,50,50,50]
include_static_vectors = false

[components.experimental_char_ner_tokenizer.model.tok2vec.encode]
@architectures = "spacy.MaxoutWindowEncoder.v2"
width = 128
depth = 4
window_size = 4
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.

Architectures

None currently.

Other

Tokenizers

  • spacy-experimental.char_pretokenizer.v1: Tokenize a text into individual characters.

Scorers

  • spacy-experimental.tokenizer_scorer.v1: Score tokenization.
  • spacy-experimental.tokenizer_senter_scorer.v1: Score tokenization and sentence segmentation.

Bug reports and issues

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

Older documentation

See the READMEs in earlier tagged versions for details about components in earlier releases.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spacy-experimental-0.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

spacy_experimental-0.2.0-cp310-cp310-win_amd64.whl (274.4 kB view details)

Uploaded CPython 3.10Windows x86-64

spacy_experimental-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (285.4 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

spacy_experimental-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl (308.4 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

spacy_experimental-0.2.0-cp39-cp39-win_amd64.whl (273.8 kB view details)

Uploaded CPython 3.9Windows x86-64

spacy_experimental-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (285.7 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

spacy_experimental-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl (307.6 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

spacy_experimental-0.2.0-cp38-cp38-win_amd64.whl (277.3 kB view details)

Uploaded CPython 3.8Windows x86-64

spacy_experimental-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (293.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

spacy_experimental-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl (300.6 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

spacy_experimental-0.2.0-cp37-cp37m-win_amd64.whl (269.0 kB view details)

Uploaded CPython 3.7mWindows x86-64

spacy_experimental-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.5 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.17+ x86-64

spacy_experimental-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl (295.8 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

spacy_experimental-0.2.0-cp36-cp36m-win_amd64.whl (268.6 kB view details)

Uploaded CPython 3.6mWindows x86-64

spacy_experimental-0.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (281.7 kB view details)

Uploaded CPython 3.6mmanylinux: glibc 2.17+ x86-64

spacy_experimental-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl (297.4 kB view details)

Uploaded CPython 3.6mmacOS 10.9+ x86-64

File details

Details for the file spacy-experimental-0.2.0.tar.gz.

File metadata

  • Download URL: spacy-experimental-0.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy-experimental-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6c0bdc5f6c1998f9b7f2702d52b5d63d3d62095f5bbdfc7eac09bba81352d2de
MD5 0ffccf0cfa5ce9a312d6c120db59cc83
BLAKE2b-256 3ae64a940a77bdea040e6007b813257cdfb868a5cc8b54ee4078d4eb0cd231ed

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 274.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 7d3b6f41791c292c8f3176ef782453b81e42382452375afec27b370ad2658d73
MD5 9a1f85e75665ba0828854146c7d4e6ee
BLAKE2b-256 6d6f11ab182a6580319e24cf947e3afeaf46e87ddd23c6965b57b1ff35efe56e

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_experimental-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 40e1392f5bef96af9fc90685e9c6204ea61f8719503a4f6076020e0a2901de28
MD5 fe611ba3d8d3356acac233444d0971d8
BLAKE2b-256 7dd0cd2ecff31bbe5ef0672fa6444057e6ceabea621a230caf465023f0b4de77

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 308.4 kB
  • Tags: CPython 3.10, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3864a6ce9b68092809b7665d8f7b6477f74dd3222b99e31e1a1c436be6bf978a
MD5 08e1a74bbedf73766d74090c85c6f236
BLAKE2b-256 1f3455ef6cf1b3724d79b6c27289b1e6e5719e577ed1a552d703cb342bf8ca82

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 273.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 5ecd83b71180b0acee299345287e485d291f8f63f5cfd5f407de63969e014f4d
MD5 86cacf1db3affaf9151f5be29208291c
BLAKE2b-256 ca887b5a6668bbfc42705f9e6f3120e418dc2d9b0be754edd01abe04567caef2

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_experimental-0.2.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ab94a73d0a09763f620d93f9ae1ecbdccb9aa741dee2d94d0cb4129709303c51
MD5 3648c7a2340857d7d079c20d91d926e1
BLAKE2b-256 669f73f8e8ee56e2ac9ebdcccba16a8ba2a94104b70d4a66ded5d9b25b57dd19

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 307.6 kB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fbb9b90a6bcbd7648871c84ec8cf1db5aabae4b570c491467eee1e4f28243cdc
MD5 ad1c87851bc581b8e5f85fbd3144bb0b
BLAKE2b-256 9ccbc68c2bf26a53841f5189365d9fa0ddf2485b3041eadb4c652c4c709bf803

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 277.3 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f2def1500eda17543e69804eea0498c7816f421d33d58388b053adf5266caab7
MD5 a3a106521bccdacc142f76b85a3caf50
BLAKE2b-256 04f2723f86fc71c1f71333939f06becd2b6e408e1c1f59c3f4a939e107ee1752

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_experimental-0.2.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 9b4d221a3844891e0840ec3334d5f72f54a73dccab2445be79d36f96f774cc38
MD5 844587df76b0377c77c4dee4f779d4f9
BLAKE2b-256 2fc0c9391d8d2e49e9e711540e55adbf630f8e1ff656229352e97c3f055df8da

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 300.6 kB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 3cce9d79c88a059be121f879cfbd2af343220c81259b91040de0cb4c5213bf55
MD5 2ac40de5966504faa27714bad8d10b4d
BLAKE2b-256 1a335507533445864f802939f230d6c26f27cb4fb1a7b0d75cf15d780ae1b826

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 269.0 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 2c9d4ba1f80e10355920d7edbad5dcfec2d8f037bc382ed8727aed63f1fb78fd
MD5 144d0d1a154dd5d4829df377de953065
BLAKE2b-256 f1f1d09d2eeda0cc6b0f83400405678ac602ae91f629880437342ae77fd75900

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_experimental-0.2.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 64734df857ba17e84936c2682bd586c686a4e72d87d7c9a378426a8e647059e6
MD5 3789864483897610efe621b824de28e7
BLAKE2b-256 cbabe5e2b106266e9f6e87be1e53236a4e8cbe85e3e2d55cd241f34f414e3e72

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 295.8 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 53d73249900d0f382286beb495c23a48d2c7c803f4730d8c201a1e7a4fccc59c
MD5 59220ff088500be90e859a6dbb94954c
BLAKE2b-256 32dca3134704a4462fd73b86f5fa6fdd4d3497be29f1e02018eab476058510bc

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp36-cp36m-win_amd64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp36-cp36m-win_amd64.whl
  • Upload date:
  • Size: 268.6 kB
  • Tags: CPython 3.6m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp36-cp36m-win_amd64.whl
Algorithm Hash digest
SHA256 50eb12c7cc3e40e288ecb944f92123bac199f72d2cbcb83434166cc9e24dd35c
MD5 8c365ca3e3d7519490d9eb0a756fd552
BLAKE2b-256 5c2ab76c546c11b15ec33b61a64efedc98aed908ea68f92ecb213f19ff4555f4

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for spacy_experimental-0.2.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 752c47a97684d208ca6cc6d1a304abbc4a912d0f64d4446a587d7fdb70639f2f
MD5 7c645c6ecfc3ac3fcc9276751de6ddbc
BLAKE2b-256 3f395dbd75a05f801dcceb430f0e82c16ee240dc1d5e128e66c828ee868e0d66

See more details on using hashes here.

File details

Details for the file spacy_experimental-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: spacy_experimental-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 297.4 kB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.2 pkginfo/1.8.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.9

File hashes

Hashes for spacy_experimental-0.2.0-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 9e9dfa32a01970a1ad71869bb8e370df004e5b37db54c31f14253b9806bce41a
MD5 56ca630796540a028d8dd6943370d094
BLAKE2b-256 21dbde53543ca7344d95b7cac9284ef13436c5b6543039044ec55ff4235439cb

See more details on using hashes here.

Release history Release notifications | RSS feed

0.6.4

29 files

0.6.3

28 files

0.6.2

28 files

0.6.1

28 files

0.6.0

23 files

0.5.0

24 files

0.4.0

19 files

This release

0.2.0 This release

16 files

0.1.0

16 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page