# REST Resource: projects.locations.synonymSets

## Resource: SynonymSet

Represents a list of synonyms for a given context. For example a context "sales" could contain: Synonym 1: sale, invoice, bill, order Synonym 2: money, credit, finance, payment Synonym 3: shipping, freight, transport Each SynonymSets should be disjoint

| JSON representation |
|---|
| ``` { "name": string, "context": string, "synonyms": [ { object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets#Synonym`) } ] } ``` |

| Fields ||
|---|---|
| `name` | `string` The resource name of the SynonymSet This is mandatory for google.api.resource. Format: projects/{projectNumber}/locations/{location}/synonymSets/{context}. |
| `context` | `string` This is a freeform field. Example contexts can be "sales," "engineering," "real estate," "accounting," etc. The context can be supplied during search requests. |
| `synonyms[]` | ``object (`https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets#Synonym`)`` List of Synonyms for the context. |

## Synonym

Represents a list of words given by the customer All these words are synonyms of each other.

| JSON representation |
|---|
| ``` { "words": [ string ] } ``` |

| Fields ||
|---|---|
| `words[]` | `string` For example: sale, invoice, bill, order |

| ## Methods ||
|---|---|
| ### `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets/create` | Creates a SynonymSet for a single context. |
| ### `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets/delete` | Deletes a SynonymSet for a given context. |
| ### `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets/get` | Gets a SynonymSet for a particular context. |
| ### `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets/list` | Returns all SynonymSets (for all contexts) for the specified location. |
| ### `https://docs.cloud.google.com/document-warehouse/docs/reference/rest/v1/projects.locations.synonymSets/patch` | Remove the existing SynonymSet for the context and replaces it with a new one. |