Closed ghost closed 3 years ago
I figured it out. https://github.com/infinyte7/Sentence-Adder-Anki-Addon/blob/main/src/editor.py#L69
For Chinese sentences it works perfectly because Chinese sentences do not contains spaces. But codes needs to change for language which contains spaces.
Added space before and after %
sql = "Select sentence from examples where sentence like " + "' %" + word + "% '"
It will work.
To be updated
Download updated addon from AnkiWeb and try it. It will work now with spaces also.
Working!
If a word is contained within another word, for example et is contained within toilette Then the sentence generator considers toilette as a valid sentence for et, which it isn't obviously and et is a different word in french.