-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from camarm-dev/dev
Ajout d'une documentation
- Loading branch information
Showing
5 changed files
with
350 additions
and
133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
|
||
# English Documentation | ||
|
||
This page is also available in [french](/FR). | ||
|
||
Welcome on the documentation page of Remède ! Navigate through the contents below | ||
|
||
### Table of content | ||
|
||
- [Development](#development) | ||
- [Setup](#setting-up-development-environment) | ||
- [Mobile application](#mobile-application) | ||
- [Web application](#web-application) | ||
- [API](#api) | ||
- [Datas](#datas) | ||
- [Remède's data](#remèdes-data) | ||
- [Dataset](#dataset) | ||
- [Remede document schema](#remède-document-schema) | ||
- [Sqlite Database](#sqlite-database) | ||
|
||
## Development | ||
|
||
### Setting up development environment | ||
- Install dependencies | ||
```shell | ||
npm i | ||
``` | ||
- Install ionic | ||
```shell | ||
npm i -g @ionic/cli | ||
``` | ||
|
||
### Mobile application | ||
|
||
- Build the project for android: | ||
```shell | ||
ionic cap build android | ||
``` | ||
- Then continue in Android Studio to build APK | ||
|
||
### Web Application | ||
|
||
This project uses [ionic](https://ionicframework.com/docs). | ||
|
||
- Run the project | ||
```shell | ||
npm run dev | ||
``` | ||
|
||
|
||
### API | ||
|
||
- Install python3 | ||
- Install dependencies | ||
```shell | ||
pip install fastapi uvicorn starlette | ||
``` | ||
- Start the server | ||
```shell | ||
python3 server.py | ||
``` | ||
Running on [localhost:8000](http:/localhost:8000) ! | ||
|
||
Documentation available at [localhost:8000/docs](http:/localhost:8000/docs). | ||
|
||
> [!NOTE] | ||
> Please [generate the sqlite database](#sqlite-database) to serve the latest version of this one through the API ! | ||
## Datas | ||
|
||
This section is destined to the data used and distributed by Remède. | ||
|
||
### Remède's data | ||
Remède creates is own base of french words, synonyms, antonyms with extern services. | ||
|
||
- Definitions by the [french Wictionary](https://fr.wiktionary.org/wiki/Wiktionnaire:Page_d%E2%80%99accueil), with the API wrapper made by [Frederic Gainza](https://api-definition.fgainza.fr/). | ||
- Synonyms from [synonymo.fr](http://www.synonymo.fr) | ||
- Antonyms from [antonyme.org](http://www.antonyme.org) | ||
- Conjugations from [conjuguons.fr](http://www.conjuguons.fr) | ||
- Examples from ???? (not implemented) | ||
- IPA from [Open Dict Data](https://github.com/open-dict-data/ipa-dict) | ||
|
||
### Dataset | ||
|
||
The `data` folder is destined to the linguistics ressources used by Remède. | ||
|
||
`data/mots.txt`: List of 245 973 words, comma separated | ||
|
||
`data/ipa.json`: For a key 'word', returns his IPA | ||
- Generated from `data/IPA.txt`: a text file of format `[word]\t[ipa]` | ||
|
||
`data/REMEDE_a.jon`: The final indexed file ; for a key 'word' returns [his document following the REMEDE schema](#remède-document-schema) | ||
|
||
`data/remede.db`: A sqlite database ([reference](#sqlite-database)) | ||
|
||
### Remède document schema | ||
JSON schema of an indexed word by Remède. | ||
|
||
```json | ||
{ | ||
"synonymes": [ | ||
"" | ||
], | ||
"antonymes": [ | ||
"" | ||
], | ||
"definitions": [ | ||
{ | ||
"genre": "", | ||
"classe": "", | ||
"explications": [ | ||
"" | ||
], | ||
"exemples": [ | ||
"" | ||
] | ||
} | ||
], | ||
"credits": { | ||
"name": "page Wiktionnaire", | ||
"url": "" | ||
}, | ||
"image": { | ||
"url": "", | ||
"credits": "" | ||
}, | ||
"ipa": "//", | ||
"conjugaisons": { | ||
"indicatif": { | ||
"present": { | ||
"je": "", | ||
"tu": "" | ||
} | ||
} | ||
} | ||
} | ||
``` | ||
|
||
- `synonymes` (`[]string`): List of synonyms | ||
- `antonymes` (`[]string`): List of antonyms | ||
- `definitions` (`[]{}`): List of objects containing a word definition | ||
- `genre` (`string`): The 'genre' of defined word | ||
- `classe` (`string`): The grammar class of defined word | ||
- `explications` (`[]string`): List of possible explanation of defined word | ||
- `exemples` (`[]string`): List of examples sentences using this word (NOT IMPLEMENTED) | ||
- `credits` (`{}`): Object containing credits of the definitions | ||
- `name` (`string`): Source name | ||
- `url` (`string`): Source Url | ||
- `image` (`{}`): object containing an image related to the definition | ||
- `url` (`string`): Image Url | ||
- `credits` (`string`): Credits Url | ||
- `ipa` (`string`): International Phonetic Alphabet pronunciation of the word | ||
- `conjugaisons` (`{}`): Object containing word's conjugations | ||
- `[nom du mode]` (`{}`): Object containing conjugations' tenses for mode | ||
- `[nom du temps]` (`{}`): Object containing subjects of tense | ||
- `[sujet]` (`string`): Verbal form (of `mode, tense, subject`) | ||
|
||
### Sqlite database | ||
|
||
The file `data/remede.db`, generated by `generate_sqlite.py` contains a database of every indexed Remède word. | ||
|
||
His schema is: | ||
- A `dictionary` table | ||
|
||
- With fields | ||
- word (`string`: the mot) | ||
- document (`string`: the Remède document in JSON format) |
Oops, something went wrong.