# synonyms.json

A synonym dictionary per language.

## `synonyms`

map of objects

One dictionary per language, such as `de` or `en`.

- `groups` (array of arrays of strings): Words that mean the same, each way round, such as `["sofa", "couch"]`.

- `one_way` (array of objects): A word that also finds others, but not the other way round: `läufer` finds `teppich`.
  
  - `from` (string · required): The word a shopper types.
  
  - `to` (string or array of strings · required): The word or words it also finds.

- `never` (array of arrays of strings): Words that look alike but must never be merged, such as `["sessel", "sofa"]`. The panel warns when a merchant tries.

## `$schema`

string

The JSON Schema an editor checks this file against; kept as written.

## Example

```json title="tests/fixtures/home/synonyms.json (trimmed)"
{
  "$schema": "../../../contracts/schema/synonyms.json",
  "synonyms": {
    "de": {
      "groups": [["sofa", "couch"], ["zweisitzer", "2-sitzer"]],
      "one_way": [
        { "from": "ecksofa", "to": "sofa" },
        { "from": "wohnlandschaft", "to": "sofa" }
      ],
      "never": [["sessel", "sofa"], ["matratze", "topper"]]
    },
    "en": {
      "groups": [["sofa", "couch"], ["sectional", "corner sofa"]],
      "one_way": [
        { "from": "loveseat", "to": "sofa" },
        { "from": "runner", "to": "rug" }
      ],
      "never": [["dresser", "chest of drawers"]]
    }
  }
}
```

**Guide:** [Synonyms](/docs/synonyms)
