Make Smart Book work for Japanese (and other spaceless languages)!

D David 2 Feb 2024 💡 Suggestion Under consideration ▲ 28
Currently, Smart Book isn’t optimal for any language that lacks spaces. The problem is, without spaces the pop-up dictionary has no way to tell where words begin and end. There are tons of great tools out now for parsing these languages—but they would need to be implemented. I’ll discuss Japanese since that’s the language I know more about, but I’m happy for anyone who knows more about another spaceless language to chime in. Japanese is made of kanji (elaborate symbols that look like this, borrowed from Chinese: 蒜肥留) which are used for nouns and verbs, but we don’t know how they sound by looking at them. They’re read depending on what word they appear in. In addition to kanji, Japanese has two different syllabaries that look like this ひいよ and this ケムラ which are used for foreign loan words, for conjugations of verbs, as particles to mark grammatical functions, and more. These don’t represent ideas like kanji do, they represent sounds: usually a pairing of one consonant with one vowel sound. So ひ is the sound or syllable “hee” and の is “no.” の can be a particle indicating possession, so if 私 means me and 本 means book, 私の本 is “my book.” But at the end of a sentence it only adds an emotional tone to the sentence. And it can appear in words spelled fully in hiragana as well. Without a parser, the dictionary has no clue if it is or isn’t part of a word, conjugation, etc. If it appears in a word, the pop-up dictionary will treat it as if it were by itself and say it indicates possession. The dictionary isn’t so bad with kanji. So I suspect it might not be so bad for Chinese, where everything consist of hanzi and only hanzi. I’d love for a Chinese reader to chime in on this. But it’s almost useless with the hiragana (ひいよ) and katakana (ケムラ), and this makes it impossible to meaningfully parse sentences in Japanese. You can’t learn conjugations on the fly by reading Japanese like you can with Spanish, for example, because you can’t tell where the conjugation actually begins or ends. This is not a problem for an advanced reader of Japanese, but it’s an impossible hurdle for the beginner. Japanese readers mostly rely on other tools to read, but there isn’t any one particular reader that dominates, and I believe Smart Book could take over the market without much effort. If Kurs is interested in promoting Smart Book to Japanese learners, I would especially recommend talking to the owner of JPBD, another one man passion project and possibly the best single resource for Japanese. JPBD is an online dictionary that shows word frequency information and allows the user to create flashcard decks directly from the dictionary entry page. If Smart Book were to be implemented together with JPBD, this could make it the most powerful tool for reading in Japanese by far.
Comments
D
David

Oh, about how JPBD works, I would like to add: it keeps track of your known vocabulary and tells you what % of any given media you would like to read you’re already familiar with. It ranks a wide range of media by multiple measures of difficulty. It has decks already made with the vocabulary from many books, movies, etc. You can pick any book and generate a new deck for it, and it will make the deck instantly while skipping particles, loan words, and anything you've ever previously marked as known or begun learning. It’s truly more advanced than any similar tool for any other language.

2 Feb 2024
B
Boris

I second this motion. There is excellent Pleco for Chinese, but as far as I know for Japanese and Korean there is no similar app. One of main points in CJK is finding word boundaries and finding proper nouns, both these tasks are super-hard for learners. Consider "peterasesport" - Peter as eSport? Pet erases port? Pete rases port?? We can use mecab (AFAIK it works for Japanese, Chinese and maybe Korean - but there are forks) if the license is Ok. And/or even https://hanlp.hankcs.com/

16 Feb 2024
K
KursX

@David send here link to JPBD, please

20 Feb 2024
K
KursX

From what I can do is try to fix the splitting of words so that they are pressed correctly and add a translation service that has an API or that can be used simply by URL I can't split into words using an online service. I need some offline solution. I found these: https://github.com/atilika/kuromoji - Couldn't get it to work https://github.com/WorksApplications/Sudachi - Requires at least Android O https://hanlp.hankcs.com/ - looks very difficult jpdb.io - I can try adding this service as a translator. I will be able to display the same text on the translation panel after clicking on a word or paragraph translation as on the site

20 Feb 2024
D
David

I can keep looking and ask around for the best solution here, if you’d like me to. A lot of these tools are very good, but as far as I know all still have a few weaknesses. They're also being improved pretty rapidly, so there may be perfect answer some months from now. jpdb's parser is better than average, but the reason I use it so much now isn't because the parser itself is so much better. It's because the way jpbd integrates a dictionary directly into a flashcard system is so much more convenient that I would still be using it even if it had a noticeably worse parser! When I mentioned integrating with jpbd, I was thinking of making it possible to tie the accounts together so that known or learned words marked in jpdb are highlighted when reading in Smart Book, or clicking words in Smart Book can add them directly to a jpdb deck. If you were able to get jpdb's owner to work with you on this, you'd easily have all jpdb users committed to Smart Book for reading! The way the flash card process is integrated imto such an excellent dictionary is already incredible, I don't think there's anything like it. If it was also integrated into a reader, I think that would generate a LOT of hype among Japanese learners and anyone who wasn't in it already would definitely be thinking about joining the jpdb/smart book ecosystem.

22 Feb 2024
B
Boris

Could you look at https://github.com/rakuten-nlp/rakutenma and https://github.com/taku910/mecab/tree/master Mecab is a standalone c++ and some java/perl/python etc binding to the native library. And Rakuten should be pure JS. Both are "Japanese" parsers, but they do support Chinese. Mecab is widely used with python bindings in Anki plugins like "anki-morphs" etc. P.S. Here is its usage and possibly dictionaries (if they are not in the main repository). https://github.com/mortii/anki-morphs/tree/main/ankimorphs/deps/mecab

26 Feb 2024
K
KursX

I can't run JS on Android. It would be awesome to find smth on Java

26 Feb 2024
SK
Stanislau Kurs

https://github.com/lrorpilla/jidoujisho

11 May 2024

Submit ticket