> For the complete documentation index, see [llms.txt](https://docs.remede.camarm.fr/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.remede.camarm.fr/database/build-dictionary/generate-my-own-database.md).

# Generate my own database

Please read [Lifecycle](/database/build-dictionary/the-building-lifecycle.md) before.

See also [Quickly add a word](/database/build-dictionary/about.md#quickly-add-a-word).

## 1 - Generate required ressources

```shell
python3 scripts/pre_generate_ressources.py
```

## 2 - Start parsing words

You need to start [api-definition](/database/build-dictionary/about.md#api-definition) in local, so our generation script can get definitions of Wiktionary.

Start `generate.py`

```shell
python3 scripts/generate.py
```

This operation take few days !

{% hint style="warning" %}
Generating a new database will erase the current one ! Make sure to save it before ! For example, make a copy of it; `cp data/remede.db data/remede.07-06-2024.db`
{% endhint %}

## 3 - Enjoy your own database !

The database situated at `data/remede.db` has been generated successfully, and you can now serve it with the API ! Congratulations !

## Troubleshooting

A generation is very long ! Sometimes it crashes or freeze... The `generate.py` script handle crashes (or in cas of freeze, the KeyboardInterrupt that you can trigger by pressing <kbd>ctrl-c</kbd> in your terminal to end the process) and saves its progression:

* `data/remede.db`; the database, not fully generated
* `data/missing-wordlist.txt`; the list of words that should have been added

To **resume the generation**, execute

```shell
python3 scripts/generate.py --resume
```

*It will automatically resume the process with the saved files*


---

# 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 dynamically by asking a question.

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

```
GET https://docs.remede.camarm.fr/database/build-dictionary/generate-my-own-database.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
