# Extracting Services from Free Text

> Source: <https://discuss.huggingface.co/t/extracting-services-from-free-text/168764#post_3>
> Published: 2026-07-29 06:29:03+00:00

[ulajci](https://discuss.huggingface.co/u/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.
