Skip to content

Commit

Permalink
update readme instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Aug 26, 2024
1 parent e6e919b commit 1d8aca7
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,28 @@ Converts wiktionary data from https://kaikki.org/ to yomitan-compatible dictiona

2. If your language is not in `languages.json`, add it.

3. Run `./auto.sh German English`.
3. Run `./auto.sh ? German English`.

4. Dictionaries should be in `data/language/de/en`.

## Contributing
## Script Parameters

Instead of a language name, you can also write `?` to run for all languages.
- `./auto.sh ? English` will run for any language to English.
- `./auto.sh German ?` will run for German to any language.
The first parameter is the wiktionary edition. For some language pairs, like German-English, the main dictionary (`kty-de-en`) is made from the English wiktionary edition, but there is also the supplementary`kty-de-en-gloss`, which is made from the German wiktionary edition. In most cases you will want to use the same edition as your target language (3rd param) or `?` to use any edition.

The `auto.sh` script can also be run with flags:
The second and third parameters are the source and target languages.

- `./auto.sh ? ? English` will run for any language to English (using data from any edition).
- `./auto.sh ? German ?` will run for German to any language (using data from any edition).

The `auto.sh` script also accepts a 4th parameter, which is a combination of the following flags:

- k: keep files (by default, the script deletes the downloaded files after running),
- d: redownload (by default, the script skips downloading if the file already exists),
- t: force_tidy (run tidy script again, even if its output already exists. useful when the tidy script is updated),
- y: force_ymt (run yomitan script again, even if its output already exists. useful when the yomitan script is updated),
- F: force = force_tidy + force_ymt,

Most often, you will want to run `./auto.sh German English kty` to recreate the dictionaries, then load them in yomitan and test them.
When trying to fix something, the `k` flag is useful prevent redownloading of files, and the `F` or `t` or `y` flags can be used to overwrite already converted files, e.g. `./auto.sh ? German English kF`

After a run, `data/language/de/en` should contain files with skipped tags for IPA and terms. Adding some to `tag_bank_ipa.json` or `tag_bank_term.json` is an easy way to improve the conversion for your language pair.

Expand Down

0 comments on commit 1d8aca7

Please sign in to comment.