Skip to main content

NLP Cache

A caching component for Doc classes in spacy.

Installation

pip install nlp_cache_sebastian_stigler

Usage

import spacy

nlp = spacy.load("de_core_news_sm")
text = "Ich wünsche Ihnen einen guten Morgen!"
doc_1 = nlp(text)  # mean loading time about 4.5 ms
doc_2 = nlp(text)  # recurrent mean loading time about 4.5 ms

To speed up loading a recurrent text you can use this caching utility, to lookup known texts from the cache stored in the cache directory (relative to the current directory).

import spacy
from nlp_cache import NlpCache

nlp = NlpCache(uncached_nlp=spacy.load("de_core_news_sm"), path="cache")
text = "Ich wünsche Ihnen einen guten Morgen!"
doc_1 = nlp(text)  # mean loading time about 4.5 ms
doc_2 = nlp(text)  # recurrent mean loading time about 840 µs

Metadata

Release files for nlp-cache-sebastian-stigler 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nlp-cache-sebastian-stigler 0.3.0
File Size Uploaded Provenance Actions
nlp_cache_sebastian_stigler-0.3.0.tar.gz 3.6 kB Without provenance Details for nlp_cache_sebastian_stigler-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nlp-cache-sebastian-stigler 0.3.0
File Interpreter ABI Platform Actions
nlp_cache_sebastian_stigler-0.3.0-py3-none-any.whl Python 3 none any Details for nlp_cache_sebastian_stigler-0.3.0-py3-none-any.whl

Total release size: 8.0 kB

Release files / nlp_cache_sebastian_stigler-0.3.0.tar.gz

Download URL nlp_cache_sebastian_stigler-0.3.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
cedef96fda4c2915c813e6a8a10240be5ef762e6b56174b5e7ea00753cfd710f
BLAKE2b-256 checksum
How to use checksums
b5ade0d1379f5e62fb7108320aea8b5617e89c5f9cc7f439b4f597ba24a4534f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.6.9

Release files / nlp_cache_sebastian_stigler-0.3.0-py3-none-any.whl

Download URL nlp_cache_sebastian_stigler-0.3.0-py3-none-any.whl
Size 4.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73e49397eafb535ff190b2931e513129685e2f93f2aa9a54147efe10b511cf52
BLAKE2b-256 checksum
How to use checksums
5f41bd9aca96318a82023a9f9a4b2d07ecc0fe15a429eb669bd8a172d869e61d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.3 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.63.0 CPython/3.6.9

Security for nlp-cache-sebastian-stigler 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files No provenance

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