# About

## Api Définition

This API, written by [Frederic Gainza](https://api-definition.fgainza.fr/), scrap the [French Wictionary](https://fr.wiktionary.org/wiki/Wiktionnaire:Page_d%E2%80%99accueil).

For Remède, **it has been readapted** by [Labse Software](https://github.com/LabseSoftware/api-definition)

### Start with docker

This API's code is contained under the `api-definition` folder which is a **git submodule**.

In `api-definition` folder:

```shell
docker build -t remede-definition-api . && docker run -p 8089:80 remede-definition-api
```

## Quickly add a word

The script `scripts/add_word.py` let you add a word to the Remède database without rebuilding it totally.

It :

* Add your word in `data/mots.txt`
* Add your word's document in `data/remede.db`

{% hint style="info" %}
You must have an [api-definition](#api-definition) instance running locally !
{% endhint %}

```shell
python3 scripts/add_word.py <word> <phoneme>
```

To add multiple words:

`wordlist.txt` (tabulation between word and IPA: `mot\t/ipa/`)

```
acupuncture /a.ky.pɔ̃k.tyʁ/
remède  /ʁəmɛd/
```

and execute

```shell
python3 scripts/add_word.py -f wordlist.txt
```

## Wordlist iterator

This script was created to iterate wordlists (text file with words separated by a newline) to add them to Remède...

The script `scripts/check_wordlist.py` iterate the given wordlist, find every word phoneme and add them to a `.words_to_add` file.

It adds all the **words that are not already in the database** to this file, them can be added with `scripts/add_word.py`. (referenced [just above](broken://pages/2AR3fjWMgzjhl8WwzCwg))

Usage:

```shell
python3 scripts/check_wordlist.py <path to wordlist>
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.remede.camarm.fr/database/build-dictionary/about.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
