# Glossary service

1 min read

The tasks of the translation glossary service are to:

1. Load glossary from file for the languages involved in translation i.e. `source_language` and `target_language`

2. Analyse the text to be translated and identify words that are part of the glossary

3. Prepare a glossary prompt part that is added to the prompt of the translation task sent to the LLM

## Prerequisites

An .xlsx containing the desired translation must be uploaded to the [Knowledge Base](https://docs.unique.ai/administrators/knowledge-base-for-admins). A template for this glossary can be downloaded here:

[XLSXexample_glossary.xlsxExcel spreadsheetDownload](https://unique-ch.atlassian.net/wiki/rest/api/content/1405814056/child/attachment/att1405814079/download)

When uploading the document it will be automatically associated with a scope and the ID of this scope will be used as the `scope_id` to retrieve the glossary during translation.

The first row must contain the name of the language as in between the “..” in the table below

| - "Albanian"<br>  <br>- "Arabic"<br>  <br>- "Armenian"<br>  <br>- "Basque"<br>  <br>- "Belarusian"<br>  <br>- "Bosnian"<br>  <br>- "Breton"<br>  <br>- "Bulgarian"<br>  <br>- "Catalan"<br>  <br>- "Chinese"<br>  <br>- "Croatian"<br>  <br>- "Czech"<br>  <br>- "Danish"<br>  <br>- "Dutch"<br>  <br>- "English"<br>  <br>- "Estonian"<br>  <br>- "Finnish"<br>  <br>- "French"<br>  <br>- "Georgian"<br>  <br>- "German"<br>  <br>- "Greek"<br>  <br>- "Greenlandic"<br>  <br>- "Hebrew" | - "Hindi"<br>  <br>- "Hungarian"<br>  <br>- "Icelandic"<br>  <br>- "Indonesian"<br>  <br>- "Irish"<br>  <br>- "Italian"<br>  <br>- "Japanese"<br>  <br>- "Korean"<br>  <br>- "Kurdish"<br>  <br>- "Latin"<br>  <br>- "Latvian"<br>  <br>- "Limburgish"<br>  <br>- "Lithuanian"<br>  <br>- "Luxembourgish"<br>  <br>- "Macedonian"<br>  <br>- "Maltese"<br>  <br>- "Mongolian"<br>  <br>- "Nepali"<br>  <br>- "Norwegian"<br>  <br>- "Persian"<br>  <br>- "Polish"<br>  <br>- "Portuguese"<br>  <br>- "Punjabi" | - "Quechua"<br>  <br>- "Romanian"<br>  <br>- "Romansch"<br>  <br>- "Russian"<br>  <br>- "Sanskrit"<br>  <br>- "Sardinian"<br>  <br>- "Serbian"<br>  <br>- "Serbo-Croatian"<br>  <br>- "Slovak"<br>  <br>- "Slovene"<br>  <br>- "Somali"<br>  <br>- "Spanish"<br>  <br>- "Sundanese"<br>  <br>- "Swedish"<br>  <br>- "Tamil"<br>  <br>- "Thai"<br>  <br>- "Tibetan"<br>  <br>- "Turkish"<br>  <br>- "Ukrainian"<br>  <br>- "Vietnamese"<br>  <br>- "Welsh"<br>  <br>- "Yiddish" |
| --- | --- | --- |

## Configuration

### Default

```json
{
    "scope_id": null,
    "filename": null,
    "active": false
}
```

### Pseudo Example

```json
{
    "scope_id": "scope_111111111111111111111111",
    "filename": "glossary.xlsx",
    "active": true
}
```

### Parameter Description

| Parameter | Description | Default Value |
| --- | --- | --- |
| `scope_id` | The scope id within the knowledge base where the glossary file is stored | "" |
| `filename` | The filename of the `.xlsx` file | "" |
| `active` | If the glossary is used or not | `false` |
