Skip to main content

DocuScope

docuscospacy: Support for spaCy models trained on DocuScope and the CLAWS7 tagset

PyPI Version Test Status Downloads from PyPI Documentation Status Citable Zenodo DOI

The docuscospacy package contains a set of functions to facilitate the processing of tagged corpora using:

The current version of the package runs in polars

The package can also convert a corpus to and from:

  • tmtoolkit – a set of tools for text mining and topic modeling

The documentation for docuscospacy is available on docuscospacy.readthedocs.org and the GitHub code repository is on github.com/browndw/docuscospacy.

Requirements and installation

docuscospacy works with Python 3.10 or newer (tested up to Python 3.12). It also requires spacy >= 3.8.

The recommended way of installing docuscospacy is to:

pip install docuscospacy

The optional dtm_to_coo helper returns a SciPy sparse matrix for interoperability with tools such as tmtoolkit. Install the sparse extra if you need that conversion:

pip install "docuscospacy[sparse]"

Note that installing the model depends on your spaCy version. Some versions allow:

pip install https://huggingface.co/browndw/en_docusco_spacy/resolve/main/en_docusco_spacy-1.5-py3-none-any.whl

But new ones may require:

pip install "en_docusco_spacy @ https://huggingface.co/browndw/en_docusco_spacy/resolve/main/en_docusco_spacy-1.5-py3-none-any.whl"

Features

Corpus analysis

The docuscospacy package supports the post-tagging generation of:

Outputs can be controlled either by part-of-speech or by DocuScope tag. Thus, can as noun and can as verb, for example, can be disambiguated.

Additionally, tagged multi-token sequences are aggregated for analysis. So, for example, where in spite of is tagged as a token sequence, it is combined into a single token.

Other features

  • KWIC tables that locate a node word in a center column with context columns on either side

Limits

  • the model that this package is designed for has only been trained on English

  • all data must reside in memory, i.e. no streaming of large data from the hard disk (which for example Gensim supports)

License

Code licensed under Apache License 2.0. See LICENSE file.

Download files

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

Source Distribution

docuscospacy-0.3.7.tar.gz (1.1 MB view details)

Uploaded Source

Built Distribution

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

docuscospacy-0.3.7-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file docuscospacy-0.3.7.tar.gz.

File metadata

  • Download URL: docuscospacy-0.3.7.tar.gz
  • Upload date:
  • Size: 1.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docuscospacy-0.3.7.tar.gz
Algorithm Hash digest
SHA256 d2d36853e06a18407f9218e2729756f1999af1315385ae9e32d3ec1a4d7ad168
MD5 834d8743a9cb4ed08dc420c2df491145
BLAKE2b-256 13311640017e87c71775d11b3f49b3af82c4c9586357d86400432dfa599b7668

See more details on using hashes here.

Provenance

The following attestation bundles were made for docuscospacy-0.3.7.tar.gz:

Publisher: ci.yml on browndw/docuscospacy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file docuscospacy-0.3.7-py3-none-any.whl.

File metadata

  • Download URL: docuscospacy-0.3.7-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for docuscospacy-0.3.7-py3-none-any.whl
Algorithm Hash digest
SHA256 12d4e71c4ec8fc3e21b09216f39be8477b9ed3e146af324f8685da6bcf376f1c
MD5 f35001c7992010adf8c9792b363dc1da
BLAKE2b-256 793fe15d9889d34beac532d2d826e38e09ba15359545949b5d1159c647718009

See more details on using hashes here.

Provenance

The following attestation bundles were made for docuscospacy-0.3.7-py3-none-any.whl:

Publisher: ci.yml on browndw/docuscospacy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page