Back

Kanji Koohii Development & OpenSource Updates

#26
Currently setting the open source repo to work with Docker, so setting up the environment and database will be easier.

Anyone has experience with Docker? I may have questions later if I run into a bump. I just have php7/apache and mysql services with docker-compose.
Reply
#27
I gave up on Docker because it uses a VM in OS X and file sharing is really slow.

I created a simple setup guide with MAMP for isolating php/mysql/apache environment on OS X.
Edited: 2017-06-16, 10:32 am
Reply
#28
(2017-06-16, 10:32 am)ファブリス Wrote: I gave up on Docker because it uses a VM in OS X and file sharing is really slow.

I created a simple setup guide with MAMP for isolating php/mysql/apache environment on OS X.

Do you mean file sharing to the Docker container on the local OS? You can set up your Dockerfile so that any files you need are copied into the image at container image build time. 

Personally, I've always found it easier to just spin up a dev Linux machine in AWS and use it as my Docker dev/build environment. You'll pay for that, obviously, but if you shut down the machine when you're not doing dev work you can keep monthly costs to within a few bucks.  

I have good experience w/ Docker and used to write tech docs/training for a Docker-related service. Let me know if you ever decide to try and take it back up.
Reply
JapanesePod101
#29
I can't work by copying files in the Docker container. I need quick edit & test cycles for front end development.

This project describes the issues with the standard Docker on OS X.

https://github.com/brikis98/docker-osx-dev

I tried it and it was kinda working but just a hassle with a separate terminal with all the rsync activity and god knows if it's 100% reliable and when a bug happens did it copy the file? Who knows.

Nah I won't waste any more time on this. There is practically no advantage seeing as MAMP works pretty much same as a container except it's pre-configured for apache / php / mysql obviously.
Reply
#30
(2017-06-16, 1:41 pm)ファブリス Wrote: I can't work by copying files in the Docker container. I need quick edit & test cycles for front end development.

This project describes the issues with the standard Docker on OS X.

https://github.com/brikis98/docker-osx-dev

I tried it and it was kinda working but just a hassle with a separate terminal with all the rsync activity and god knows if it's 100% reliable and when a bug happens did it copy the file? Who knows.

Nah I won't waste any more time on this. There is practically no advantage seeing as MAMP works pretty much same as a container except it's pre-configured for apache / php / mysql obviously.

Have you tried Docker For Mac (https://docs.docker.com/docker-for-mac/)? It seems the integration with the file system is a lot better on it.

"osxfs is a new shared file system solution, exclusive to Docker for Mac. osxfs provides a close-to-native user experience for bind mounting macOS file system trees into Docker containers."

By the way, I tried to run the Koohii code on Docker, but I couldn't configure it properly. I always get a "Configuration "config/databases.yml" does not exist or is unreadable." error.
Reply
#31
Update on the github repository

The repository now includes the database schema used for JMDICT related features:
  • the Dictionary section in the Study pages
  • the example words on flashcards along with the highlighted kanji reading.
jdict_schema.sql describes the tables. jdict_queries.sql describes some sample queries.

https://github.com/fabd/kanji-koohii/tre...ta/schemas

An up to date export of those tables can be found here in the kanji-koohii-files repo (jdict_tables_latest.sql.gz).

Help with further improving the performance of these tables and queries is very much welcome!


Scripts

The scripts used to generate "split readings" as well as parse JMDICT are in data/scripts/dict/. Please note I wrote this way back in 2007 for the now defunct "Trinity" (which had a vocab & sentence SRS). So you may need eye bleach after looking at that code. For example back then I was struggling with utf8, and I had a utf8 library in php... otherwise I would have written the split_readings in Perl which I think is more convenient for that sort of parsing.

In regard to the split_readings.php script. If I did this today I could use better tools perhaps something like JmdictFurigana . However the output from my php script is what goes into my jMDICT parsing script...  basically for historical reasons... as long as it works it's not a good use of my time to try and redo all of this stuff. With that said one limitation I see of JmdictFurigana, is that the output file does not indicate if the split readings are from On or Kun.

One way to contribute here would be to help me clean up and prettify those scripts so they are more maintainable. Or... replace them altogether with better scripts.. which output the data for the tables in the provided schema or a better schema (jdict, dictprons, dictsplit, dictlevels).


For questions regarding the repo get in touch on Gitter. https://gitter.im/kanji-koohii/development
Edited: 2017-08-20, 11:12 am
Reply
#32
Hi folks

I will need some mobile testers (phone and tablet, but especially phone) soon.

If you'd like to help test as well as provide feedback on new developments please join the Gitter channel. I suggest to sign up on Github rather than use Twitter signin, that way you can also comment on related github issues (same account). (There is also a Gitter client on mobile.)

https://gitter.im/kanji-koohii/feedback

Leave a message with the model of device you use for flashcard reviews and / or browsing Study pages.

I will update there soon with a new version on staging that has a lot of refactoring. I will need people use this development version and tell me if everything works fine. Then I can start building new things.
Edited: 2017-09-26, 10:20 am
Reply
#33
I use the Kanji Ryokucha app together with Kanji Koohii. Here is a change/feature request for the Kanji Koohii website:

I use the website to "restudy", meaning I review/edit a card and its story and then press the "add to learned list" button, which add it to the "failed" pile (which I then work through on the KR mobile app).

One thing I would change: if I navigate away from the last "restudy" card, I cannot easily navigate back to continue work on the "restudy" pile. The only way to continue is to find/guess a random card in the restudy pile and manually navigate to its page, which reveals the "add to learned list" button and lets me continue.

However, more often I continue by using the "clear" button, which puts me back in the "restudy" pile (but makes me press "add to learned list" again for a bunch of cards that I already reviewed).

Another item:

I suggest displaying dates in the YYYY-MM-DD format (ISO 8601).

The current DD-MM-YYYY format is confusing for people who are used to seeing dates formatted for the US locale.
Edited: 2017-11-07, 11:04 am
Reply
#34
Hey, do you plan to make 'Review SRS' feature to show some example of on/kun reading too? or maybe sentences?

I like 'review kanji' in the case I can choose an option to show me a example of word using that kanji.. well you can also click dict above to show but it just a lot of works to click it for every kanji u review..
Reply
#35
(2017-11-16, 9:46 pm)moevora Wrote: Hey, do you plan to make 'Review SRS' feature to show some example of on/kun reading too? (...)

[Image: rahiYI2.png]
Reply