Given that the data source for the flashcards (which we can call DS-A) has to be different from the data source for the dictionary (DS-B) we can ignore the formation of a full dictionary for now and deal with a data source for flashcards. This does not need to be a user-created data source because the system is intended to analyze readings and come up with a list of vocabulary words based on that reading. Such would be impossible unless the system was programmed to understand the vagaries of particular language X, such as Japanese vs. Hebrew. At worst the system could have user-added vocabulary cards added (by hand) to various readings as a service. Then, these cards would need to conform to well-known data structures which preclude the allowance of user-formulated data structures.

Flashcard Dictionary

Data Source “A”, will contain at least keyword and gloss. However from experience in physical flashcards at least three other fields will be desirable. One, we will want part of speech. This will help define a difference between words like smell (verb) and smell (noun) which can be important during the learning process. Secondly we will want sentence patterns in addition to gloss. Optionally we may want to include some sort of phonetic representation, both in the foreign language and the native language ex. Hiragana and Romaji for Japanese and English.

Card Types

It may be interesting to allow users to define custom card types with placeholders such as %gloss%, %pos% and %keyword%. Perhaps this could just be HTML with statements like <div class=”pos”></div> for which we will then substitute in the proper information via javascript. This will depend on the method of display which is outlined below in “Panel Method”.

Panel Method for Display

A page will be loaded and Javascript will call a php script, which will then return data for the first flashcard. This will be displayed in a form, and/or processed from tags as stated above. When displayed, buttons will be shown either by the javascript or the PHP. Data from the buttons such as “Known”, Good” or “I don’t remember” will then be posted back to the PHP script and the script will pull the next flashcard. This data will be dumped back to the javascript which will then display it.

This will be done inside a Bootstrap 4 panel. The most optimal way will be to have the javascript construct the panel around just-the-data transmitted by the PHP script, although for development purposes having the PHP script produce the entire panel and the buttons (at least to start) will probably be easier to code. The two ways to do this cleanly without whole-page reloads seem to be putting it into an iframe, and having it just run entirely via HTML, or (perhaps cleaner/better/faster) having a nosubmit form and having the javascript do the posting and panel construction as mentioned.

In any case because a single PHP script updates the form submission and pulls the next card, atomic problems of pulling a card possibly before prior update are solved.

Final notes re: MyWiki

I’ve been putting off MyWiki development for a long time. Recent changes is a pain in the ass to put together. I don’t really want to do it. But having the integrated wiki with full page level rights management is too good. Frankly though I might just dump MyWiki development in favor of something like DokuWiki. I really would need the right Wiki to come along though. Perhaps it is time to re-evaluate existing wikis, at the worst to see what features I should be copying, at best to discover a better solution than writing a whole new wiki (which is fun but I hate coding recent changes).

By Serena

Leave a Reply

Your email address will not be published. Required fields are marked *