cd /news/natural-language-processing/extracting-services-from-free-text · home topics natural-language-processing article
[ARTICLE · art-78179] src=discuss.huggingface.co ↗ pub= topic=natural-language-processing verified=true sentiment=· neutral

Extracting Services from Free Text

A Hugging Face user asks for the best method to extract services from free text, citing a rule-based approach with synonym dictionaries and negation detection as a starting point, with NLP or zero-shot models as a potential second validation step for varied reports.

read1 min views1 publishedJul 29, 2026
Extracting Services from Free Text
Image: Discuss (auto-discovered)

ulajci 1 What is the best method to find out which services are reported in a text? Should I use a ML approach or Rule-based Approach? What are the most accurate approaches?

Example

Catalog: 14 home services (window cleaning, roof inspection, pest control, etc.)

Input (short report):

Did a roof inspection, need gutter repair, window cleaning, tree pruning, pressure washing, sprinkler repair. Owner declined pest control, said no fence install, driveway sealing not needed.

Output (present): roof inspection, gutter repair, window cleaning, tree trimming, power washing, sprinkler repair

Excluded:

pest control, fence installation, driveway sealing, others not mentioned

I agree that a rule-based approach can work well when you have a fixed catalog of services. In your example, the bigger challenge seems to be handling negations like “declined pest control”, “not needed”, or “no fence install”, along with different ways people describe the same service (e.g., “tree pruning” vs. “tree trimming”, “pressure washing” vs. “power washing”).

I’d probably start with rule-based matching using a synonym dictionary and negation detection. If the reports become more varied over time, adding an NLP or zero-shot model as a second validation step could improve recall without making the system overly complex.

── more in #natural-language-processing 4 stories · sorted by recency
── more on @hugging face 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/extracting-services-…] indexed:0 read:1min 2026-07-29 ·