# spacy

Published articles for spacy.

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Redacting Personal Data: A Speed and Accuracy Comparison of Regex, Presidio and Hybrid Designs

DevFeed: [Redacting Personal Data: A Speed and Accuracy Comparison of Regex, Presidio and Hybrid Designs](<https://devfeed.tech/articles/redacting-personal-data-a-speed-and-accuracy-comparison-of-regex-presidio-and-hybrid-designs-120219.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.07633>)

Author: Sai Yashwant, Manoj Kumar Gondimalla, Arjun Sharma, Shubham

Published: 2026-11-06T05:00:00Z

Content type: comparison

Language: en

Sources: [arXiv: Artificial Intelligence](<https://devfeed.tech/sources/arxiv-artificial-intelligence.md>)

Topics: [pii](<https://devfeed.tech/topics/pii.md>), [ner](<https://devfeed.tech/topics/ner.md>), [ai security](<https://devfeed.tech/topics/ai-security.md>), [Large Language Model](<https://devfeed.tech/topics/llm.md>), [AI Integration Strategies](<https://devfeed.tech/topics/ai-integration-strategies.md>)

Tags: [comparison](<https://devfeed.tech/tags/comparison.md>), [cs-ai](<https://devfeed.tech/tags/cs-ai.md>), [data](<https://devfeed.tech/tags/data.md>), [fast](<https://devfeed.tech/tags/fast.md>), [hybrid](<https://devfeed.tech/tags/hybrid.md>), [large-language-models-llms](<https://devfeed.tech/tags/large-language-models-llms.md>), [latency](<https://devfeed.tech/tags/latency.md>), [personal](<https://devfeed.tech/tags/personal.md>), [personal-data](<https://devfeed.tech/tags/personal-data.md>), [pii](<https://devfeed.tech/tags/pii.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [redaction](<https://devfeed.tech/tags/redaction.md>), [regex](<https://devfeed.tech/tags/regex.md>), [resume](<https://devfeed.tech/tags/resume.md>), [spacy](<https://devfeed.tech/tags/spacy.md>), [speed](<https://devfeed.tech/tags/speed.md>)

### AI overview

In tests on 100 synthetic resumes, regex redaction was fastest (0.20 ms median) but detected only 88.9% of PII, missing names not known in advance. Microsoft Presidio with spaCy, a hybrid using Presidio for names and regex for structured identifiers, and a fast hybrid calling spaCy's named-entity component each detected all PII and preserved all business terms. Their median latencies were 37.59 ms, 30.23 ms, and 13.48 ms, respectively; even Presidio added just 0.41% against the workflow's 9,120 ms median LLM call. All designs also removed the known subject and used consistent placeholders. The paper recommends the fast hybrid as a default for personal-data pipelines, with regex as a safety net. Results are from this synthetic resume workflow.

### Source excerpt

arXiv:2611.07633v1 Announce Type: new Abstract: Many enterprise projects now pass free text to large language models (LLMs), and that text often contains personally identifiable information (PII) such as names, phone numbers, email addresses, home addresses and dates of birth. Once a prompt is sent, this data is copied into provider systems, application logs and observability traces. Redacting PII before the call is an obvious control, yet teams seldom have numbers on what it costs in latency or what it lets through. This paper compares four redaction designs that any LLM pipeline can adopt: a pure regular-expression (regex) redactor, Microsoft Presidio running on a spaCy model, a hybrid in which Presidio finds only person names while regex handles structured identifiers, and a fast hybrid that calls spaCy's named-entity component directly. All four share a known-entity rule, which removes the person the system already knows it is handling, and a consistent placeholder scheme, so the LLM can still tell one person from another after redaction. We evaluate the designs on a sample workflow, which we call ProfileAssist, that turns resumes into structured profiles, using 100 synthetic resumes (523 characters on average, with 900 PII values and 600 business terms that must survive). Regex ran at a 0.20 ms median but caught only 88.9% of PII, because it cannot find names that are not known in advance, such as the references listed in a resume. Presidio, hybrid and fast hybrid each caught 100% of PII and kept 100% of business terms, at median latencies of 37.59 ms, 30.23 ms and 13.48 ms. Measured against a 9,120 ms median LLM call, even the slowest option adds only 0.41% to the request. We therefore recommend the fast hybrid as a default for LLM pipelines that handle personal data, with regex kept as a safety net rather than as the only control.

## Using Spacy for Part of Speech Tagging

DevFeed: [Using Spacy for Part of Speech Tagging](<https://devfeed.tech/articles/using-spacy-for-part-of-speech-tagging-28236.md>)

Original publisher: [Read original article](<http://fuzzyblog.io/blog/python/2020/06/24/using-spacy-for-part-of-speech-tagging.html>)

Author: Fuzzygroup

Published: 2020-06-24T00:00:00Z

Content type: tutorial

Language: en

Sources: [Scott Johnson](<https://devfeed.tech/sources/scott-johnson.md>)

Topics: [spaCy](<https://devfeed.tech/topics/spacy.md>), [Artificial Intelligence](<https://devfeed.tech/topics/ai.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>), [Ruby on Rails](<https://devfeed.tech/topics/ruby-on-rails.md>)

Tags: [ansible](<https://devfeed.tech/tags/ansible.md>), [api](<https://devfeed.tech/tags/api.md>), [flask](<https://devfeed.tech/tags/flask.md>), [json](<https://devfeed.tech/tags/json.md>), [nlp](<https://devfeed.tech/tags/nlp.md>), [pos](<https://devfeed.tech/tags/pos.md>), [python](<https://devfeed.tech/tags/python.md>), [rails](<https://devfeed.tech/tags/rails.md>), [spacy](<https://devfeed.tech/tags/spacy.md>)

### AI overview

The excerpt shows how spaCy's small English model can label each token with a part of speech, a detailed tag, and an explanation. Install spaCy and download `en_core_web_sm`, load the model with `spacy.load`, process a sentence, then iterate over its tokens and print `text`, `pos_`, `tag_`, and `spacy.explain(tag_)`. The example sentence, "ADL - Make the ansible create all the queues," produces labels such as `PROPN` for "ADL," `VERB` for "Make," and `NOUN` for "queues." The author says spaCy makes this easier than prior work with Princeton's WordNET and is considering exposing the tagging through a Flask API that returns JSON for a Rails system; this integration is proposed, not demonstrated.

### Source excerpt

Part of speech tagging is a classic NLP (natural language parsing) where you give a sentence of sentence fragment to a bit of software and ask it to tell you the parts of speech. If this sounds like a 7th Grade English exercise, well, you aren't wrong ... I'm experimenting with this for an upcoming user interface where I'm hoping to use NLP techniques to lessen the amount of manual data entry. I chose to use Spacy, a Python NLP tool, for this. Here's an example of the output from Spacy: Input: ADL - Make the ansible create all the queues Output: ... ADL PROPN NNP noun, proper singular - PUNCT : punctuation mark, colon or ellipsis Make VERB VB verb, base form the DET DT determiner ansible ADJ JJ adjective create NOUN NN noun, singular or mass all DET PDT predeterminer the DET DT determiner queues NOUN NNS noun, plural I've done this type of stuff in the past using tools like Princeton's WordNET but Spacy makes this even easier that ever before. Here's all it took: pip3 install spacy python3 -m spacy download en_core_web_sm Here's the accompanying Python code. This code does two things. It starts by defining a Spacy document based on the sentence and then it iterates over the words in the sentence and gives the word tags and explanation. >>> import spacy >>> sp = spacy.load('en_core_web_sm') >>> sen = sp("ADL - Make the ansible create all the queues") >>> for word in sen: ... print(f'{word.text:{12}} {word.pos_:{10}} {word.tag_:{8}} {spacy.explain(word.tag_)}') ... ADL PROPN NNP noun, proper singular - PUNCT : punctuation mark, colon or ellipsis Make VERB VB verb, base form the DET DT determiner ansible ADJ JJ adjective create NOUN NN noun, singular or mass all DET PDT predeterminer the DET DT determiner queues NOUN NNS noun, plural I'm contemplating this for a system built in Rails and it isn't hard to envision setting up a simple Flask API that front ends a Spacy installation that does just this much and returns the result as a JSON structure. Spacy - very, very much