Japanese Examples
Japanese Examples is a plugin for the Anki flashcard software that adds example sentences and their translations to your Japanese flashcards, sourcing them directly from the Tatoeba project.
Overview
Single-Card Addition

Batch Addition

Features
- Interactive Single-Card Addition: Find and select the perfect example sentence while editing a single flashcard. Sentences with a native-speaker recording are marked with π in the picker.
- High-Performance Batch Addition: Automatically add example sentences to an entire deck of cards at once. The plugin downloads and indexes Tatoeba's database locally using SQLite, enabling incredibly fast bulk processing.
- Native-Speaker Audio: Example sentences can come with their native-speaker recordings from Tatoeba, in both manual and batch mode. Sentences with audio are preferred, and recordings are saved into a field of your choice. Downloads run in the background with a progress counter, so Anki stays responsive.
- Multiple Field Pairs: Batch mode can fill up to 3 example/translation field pairs per card, and decks mixing several note types offer all their fields in the dialog.
- Deck and Subdeck Selection: Process a whole deck tree or a single subdeck, with a confirmation before processing an entire tree.
- Undoable Batch Runs: Press Ctrl+Z to revert added examples and audio after a batch run, and get a report of the results, including any audio errors.
- Always Up-to-Date: For single additions, the plugin connects directly to the Tatoeba API to ensure you have the latest available examples.
- Multilingual UI: The plugin interface and menus are automatically translated into English, French, Spanish, Chinese (simplified), or Korean based on your Anki language settings.
- Five Translation Languages: Get example sentence translations in English, French, Spanish, Chinese (simplified), or Korean β choose a language in the editor dialog, set a per-deck default, or pick the language in the batch dialog.
Installation
Recommended: Install via AnkiWeb to receive automatic updates.
View the add-on on AnkiWeb or use the code 1204068184 in Anki (Tools > Add-ons > Get Add-ons...).
Manual Installation
- Download the latest version of the plugin from the releases page.
- Open Anki and go to Tools > Add-ons > Install Add-on from File.
- Select the downloaded file and click Open.
- Restart Anki to complete the installation.
Usage
Initial Setup
- Open the plugin's configuration in the addon manager.
- Define the names of the fields used for your Japanese examples, translated examples, and audio recordings.
- Restart Anki to apply these settings.
Adding Examples Manually
- Create a new card or open an existing one in the editor.
- Click on the "Add an example sentence manually" button among the editor's formatting buttons.
- Follow the instructions to choose your preferred sentence and insert it into the card.
Batch Processing
- In the main Anki window, go to Tools > Batch process examples.
- In the "Data Management" section, choose your target language β English, French, Spanish, Chinese (simplified), or Korean β and click Download data. Wait for the progress to complete.
- In the "Execution" section, select your target Deck β you can process a whole deck tree (including its subdecks) or narrow it down to a single subdeck.
- Map the Source field (containing your lookup word), then the Japanese example, Translated example, and Audio fields. You can add up to 3 example/translation field pairs to fill several examples per card.
- Check "Skip cards with existing examples" if you only want to process empty cards.
- Click Run batch process and let the engine populate your deck! A report shows the results when it finishes, including audio downloads, and you can press Ctrl+Z to undo the whole run.
FAQ / Troubleshooting
"No example found" when I search for a word β why?
Sentence matching is approximate: the plugin tokenizes Japanese with a regex-based tokenizer (no morphological analyzer), so conjugated or unusual word forms may not match. Try a simpler form of the word (e.g. the dictionary form ι£γΉγ instead of ι£γΉγ). For single additions, results come live from Tatoeba β a rare word may genuinely have no sentence with a translation in your target language.
Does the add-on need internet access?
Yes, for two things: single-card additions query the Tatoeba API live, and batch mode must download the Tatoeba datasets before its first run. If you suspect connectivity problems, open the add-on settings and use the Test Connection button to check that the Tatoeba API is reachable.
How much disk space do the downloaded datasets take, and where are they stored?
Batch mode downloads the per-language Tatoeba sentence exports and builds a local SQLite search index from them. Each language is stored as a single file β jpn_<lang>_index.db β inside the add-on's user_files/ folder (a few hundred MB per language). To free space you can delete a language's jpn_<lang>_index.db directly; the batch dialog will then simply ask you to re-download it.
During a download the importer also needs transient free space for the compressed exports and a throwaway build directory (peak usage can reach a few GB for the largest languages), but these are cleaned up automatically once the build finishes, leaving only the finished index behind.
If you are upgrading from v1.5.0 or earlier, those versions also kept a jpn_<lang>_pairs.tsv next to each index. The add-on now deletes those automatically on startup, reclaiming a few hundred MB per language β you do not need to do anything.
Why is audio missing for some sentences?
Audio is best-effort: only a subset of Tatoeba sentences have native-speaker recordings. In both modes the plugin prefers sentences that have recordings, but if the chosen sentence has none (or Tatoeba returns "no recording"), the audio field is simply left empty. This is expected, not an error.
One exception in batch mode: when a sentence has a recording whose author restricts it to Tatoeba-only reuse (HTTP 403), the plugin tries another sentence for the same word and, only if that one's audio downloads successfully, swaps the pair's text and audio to it. If no alternative works, the original sentence stays and its audio field is left empty.
Can I undo a batch run?
Yes. Each batch run is wrapped in a single undo entry β press Ctrl+Z right after the run to revert the added examples and audio. Audio file downloads are not covered by undo, but the [sound:] tags in your cards are.
My Anki interface is in a language the add-on doesn't support yet β what happens?
The add-on follows your Anki UI language. English, French, Spanish, Chinese (simplified), and Korean are fully translated; any other language falls back to English.
The editor button or the settings don't work as expected
The editor button lives in the card editor's formatting bar. If it is missing, check that the add-on is enabled in Tools > Add-ons. For "field not found" errors, open the add-on settings (Tools > Add-ons > select "Japanese example sentences" > Config) and make sure the configured field names match your note type exactly. Use Test Connection in the same dialog to verify Tatoeba is reachable.
Why were some cards skipped during batch processing?
Cards are skipped when: they already have examples in every destination pair and "Skip cards with existing examples" is checked; no matching sentence was found in the local index; or the note type lacks the configured source or destination fields. The final report shows the exact count for each skip reason.
License
Japanese Examples is licensed under the GPLv3 License.
Contributing
If you would like to contribute to Japanese Examples, please follow these steps:
- Fork the repository.
- Create a new branch:
git checkout -b my-new-feature.
- Make your changes and commit them:
git commit -am 'Add some feature'.
- Push to the branch:
git push origin my-new-feature.
- Submit a pull request.