
Product
Introducing Rust Support in Socket
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
nlp-cache-sebastian-stigler
Advanced tools
A caching component for Doc
classes in spacy
.
pip install nlp_cache_sebastian_stigler
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
FAQs
A caching component for `Doc` classes in `spacy`.
We found that nlp-cache-sebastian-stigler demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.