> 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

Learn how to generate your own Remède database !

Please read [Lifecycle](https://docs.remede.camarm.fr/database/build-dictionary/the-building-lifecycle.md) before.

See also [Quickly add a word](https://docs.remede.camarm.fr/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](https://docs.remede.camarm.fr/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
