- Add double join on translations for source/target languages - Left join term_glosses for optional source-language glosses - Filter difficulty on target side only (intentionally asymmetric: a word's difficulty can differ between languages, and what matters is the difficulty of the word being learned) - Return neutral field names (sourceText, targetText, sourceGloss) instead of quiz semantics; service layer maps to prompt/answer - Tighten term_glosses unique constraint to (term_id, language_code) to prevent the left join from multiplying question rows - Add TODO for ORDER BY RANDOM() scaling post-MVP
55 lines
836 B
Markdown
55 lines
836 B
Markdown
# notes
|
|
|
|
## tasks
|
|
|
|
- pinning dependencies in package.json files
|
|
- rethink organisation of datafiles and wordlists
|
|
|
|
## notes
|
|
|
|
- backend advice: https://github.com/MohdOwaisShah/backend
|
|
- openapi
|
|
- bruno for api testing
|
|
- tailscale
|
|
- husky/lint-staged
|
|
- musicforprogramming.net
|
|
|
|
## openwordnet
|
|
|
|
download libraries via
|
|
|
|
```bash
|
|
python -c 'import wn; wn.download("omw-fr")';
|
|
```
|
|
|
|
libraries:
|
|
|
|
odenet:1.4
|
|
omw-es:1.4
|
|
omw-fr:1.4
|
|
omw-it:1.4
|
|
omw-en:1.4
|
|
|
|
upgrade wn package:
|
|
|
|
```bash
|
|
pip install --upgrade wn
|
|
```
|
|
|
|
check if wn is available, eg italian:
|
|
|
|
```bash
|
|
python -c "import wn; print(len(wn.words(lang='it', lexicon='omw-it:1.4')))"
|
|
```
|
|
|
|
remove a library:
|
|
|
|
```bash
|
|
python -c "import wn; wn.remove('oewn:2024')" python -c "import wn; wn.remove('oewn:2024')"
|
|
```
|
|
|
|
list all libraries:
|
|
|
|
```bash
|
|
python -c "import wn; print(wn.lexicons())"
|
|
```
|