This script looks for Japanese words (or characters) in the Tatoeba sentence corpus. It returns a list of sentences containing the target words where each line of text contains the Japanese sentence, the phonetic reading of the sentence, and the English equivalent. This information is designed to be saved as a text file and imported into Anki.
The user can choose the maximum sentence length, in Japanese characters, and the desired sentences per word. Tatoeba has a limited number of sentences, and particularly restrictive searches might yield limited results.
The script is GPLv3 licensed. You can set up your own instance if you prefer. The sentences data from Tatoeba is Creative Commons Attribution 2.0 licensed. See the websites for details.