> For the complete documentation index, see [llms.txt](https://docs.zingg.ai/zingg/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zingg.ai/zingg/tuning/improve-accuracy/remove-stopwords-optional.md).

# Remove Stopwords (Optional)

An optional pre-processing step that improves matching accuracy by excluding high-frequency words that carry no matching signal.

{% hint style="success" icon="right-long" %}
This is an optional step. Run this between [Configure Zingg](/zingg/running-zingg/configure-zingg.md) and [Create Training Data](/zingg/running-zingg/create-training-data.md) for best results. You can run it after matching has already started, but you will need to re-run the match phase for the stopwords to take effect. Most users skip this on the first run.
{% endhint %}

Common words like `Mr`, `Pvt`, `Av`, `St`, `Street` do not add differential signals and can confuse matching. These are called stopwords. Zingg can recommend which words to treat as stopwords by analyzing your data before training begins.

This step is optional but recommended for address, company name, and location\
fields where generic terms are common.

{% tabs %}
{% tab title="Community" %}

### **Step 1: Generate stopword recommendations**

#### **Python**

```python
options = ClientOptions([ClientOptions.PHASE, "recommend"])
zingg = Zingg(args, options)
zingg.setColumn("<column_name>")
zingg.initAndExecute()
```

#### **CLI**

```bash
./scripts/zingg.sh --phase recommend --conf config.json --column <column_name>
```

{% hint style="success" icon="right-long" %}
Stopwords are stored at: `models/100/stopWords/columnName`. The output gives you the list of stopwords along with their frequency.
{% endhint %}

### **Step 2: Review the recommendations**

By default, Zingg extracts 10% of the high-frequency unique words from your dataset. To change this, set `stopWordsCutoff` in your config file under the relevant field: `"stopWordsCutoff": 0.1`.

### **Step 3: Configure stopwords in your field definition**

Once you have verified the stopwords, add the `stopWords` path to the relevant field in your config. The CSV file must have one word per row and include a header row - Zingg ignores the header by default.

#### **JSON**

```json
{
  "fieldDefinition": [{
    "fieldName": "fname",
    "matchType": "fuzzy",
    "fields": "fname",
    "dataType": "string",
    "stopWords": "models/100/stopWords/fname.csv"
  }]
}
```

{% endtab %}

{% tab title="Enterprise" %}

### **Python**

```python
options = ClientOptions([ClientOptions.PHASE, "recommend"])
zingg = EZingg(args, options)
zingg.setColumn("<column_name>")
zingg.initAndExecute()
```

### **CLI**

```bash
./scripts/zingg.sh --phase recommend --conf config.json --column <column_name>
```

{% endtab %}

{% tab title="Enterprise Snowflake" %}
Stopwords are stored as a table: `zingg_stopWords_columnName_modelId`

#### CLI

```bash
./scripts/zingg.sh --phase recommend --conf config.json --column <column_name> \
--properties-file <location to snowflake.properties>
```

#### Snowflake (job service)

```sql
EXECUTE JOB SERVICE
IN COMPUTE POOL CONTAINER_ZINGG_POOL
NAME = ZINGG_RECOMMEND_ASYNC_JOB_SERVICE
ASYNC = true
EXTERNAL_ACCESS_INTEGRATIONS = (ALLOW_ALL_EAI)
FROM @specs SPECIFICATION_TEMPLATE_FILE = '<zingg-job-spec-file>'
USING (PHASE => 'recommend', CONFIG => '<config-name>', COLUMN => '<column_name>');
```

Stopwords are stored as a table: `zingg_stopWords_columnName_modelIds`
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zingg.ai/zingg/tuning/improve-accuracy/remove-stopwords-optional.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
