on the Curl Web Content Markup Language

on the Curl Web Content Markup and Programming Language from www.curl.com and www.curlap.com
Showing posts with label Kanji of the day. Show all posts
Showing posts with label Kanji of the day. Show all posts

Monday, July 16, 2012

Two Kanji Day


It is another 2 kanji day at the new 400+ frequent non-jōyō Japanese kanji page at aule-browser.com's kanji home page.

There is one "kanji of the day" in the Curl applet's search pane and the list of kanji is randomized each session so that at least the top character in the list may also strike you as yet another "kanji of the day".

Many of the kanji pages are now using randomized lists, although this will soon be an option for the user to select as a CSPD preference.

The webpage requires the Surge® RTE Curl browser plugin from www.curl.com

The Curl applet is fully packaged with a super-package for AULE and a sub-package for "KANJI" but required some attention to avoid having to use a {define-alias } macro in the applet itself.

The kanji are loaded from a serialized array placed in a bin file and the applet uses a pre-sized FastArray for the content to be displayed.


Tuesday, June 19, 2012

Kanji of the Day


Because a collection of Curl objects underlies the Kanji by Grade pages at http://www.aule-browser.com/kanji/kanjidic2-grades.html the pages now have a Kanji of the Day feature with only a minimal change (a variable's value replaces a character literal and a procedure is called with two integers to delimit a safe and reasonable range.)

The Kanji character for the session is placed as the default in the search text field. A student clicks the 'Find' button to jump to the definition for that Japanese kanji character.

Within the applet, the kanji character is found by using a factory method on the class Random and a seed from a DateTime instance. The instance of a Random type is likely LinearRandom as Random is itself an abstract  class.

The same class declaration 'scurl' file is included by all of these kanji-by-grade applets.

Note: I also generalized the search function today by using one more instance of GuiMark.




Sunday, June 3, 2012

serialization for text source integrity


I now have a Curl applet up using only serialized data as the source - this will make all of the "Learn Kanji" applets faster hereafter and help keep my fingers off my input text source !

The applet uses the {deserialize } macro to load its data and does not reach the original source.

The approach will result in much faster "kanji of the day" applets using the Basho Haiku as their learning resource as no iteration through the data will occur at load time and the applets are one degree away from the vulnerable source.

This will be even more significant when working with no SQL and no JSON for the large JMDict Japanese resource as well as the smaller Kanjidic2 and its Edict2.

Entire arrays are serialized with a simple call to a stream to write one object.  The object classes are declared as serializable and all affected fields have at least a default value.

The result is that my own annotations are kept independent of the source file.

I may turn this same approach to an applet for viewing the tags in my 9000+ Firefox booksmarks so as to avoid both HTML and JSON.

Here is a snap: