KanjiVG Google Group Broken?

26 views
Skip to first unread message

Raeldor

unread,
Jun 11, 2009, 11:51:34 AM6/11/09
to tagaini-jisho
Hi,

I'd really like to use your kanji path data in an application I'm
trying to write for the iphone. I was wondering what the format of
your path data was in the XML file. Is there documentation on the
syntax?

Thanks
Rael

Alexandre Courbot

unread,
Jun 11, 2009, 6:10:25 PM6/11/09
to tagain...@googlegroups.com
Hello,

Yep, KanjiVG's strokes are just standard SVG paths:

http://www.w3.org/TR/SVG/paths.html#PathData

The graph area size is always 109x109.

By the way, why the title "KanjiVG group broken"?

Alex.

Raeldor

unread,
Jun 11, 2009, 7:06:28 PM6/11/09
to tagain...@googlegroups.com
Because when I try and go to the google group for KanjiVG my browser just sits there and never goes to the group.

Thanks for the SVG pointer, I'll check this out now.

All the best
Ray

Alexandre Courbot

unread,
Jun 11, 2009, 8:54:28 PM6/11/09
to tagain...@googlegroups.com
> Because when I try and go to the google group for KanjiVG my browser just
> sits there and never goes to the group.

Right, I'm having problems like that too - KanjiVG group is incredibly
slow. And I'm not even sure messages get delivered.

> Thanks for the SVG pointer, I'll check this out now.

If you want an example code for parsing such paths, you can have a
look at Tagaini's code:

http://bazaar.launchpad.net/~gnurou/tagaini-jisho/trunk/annotate/head%3A/src/kanjidic2/KanjiStroke.cc

Especially the pathFromSVG method. It's pretty simple to render these
paths using Qt. A SVG library would also make it, I guess. Also, if
you can access the KanjiVG group, Ben posted some perl code that
builds a readable SVG image from the paths.

Alex.

Raeldor

unread,
Jun 16, 2009, 1:19:09 AM6/16/09
to tagain...@googlegroups.com
Hi Alex,

Thanks for the tips.  I just merged the svg data with (jim breens?) kanjidic data and made an xml file for my iphone flash card application.  I checked out your SVG references and wrote some iphone code to render the path from the SVG data, which seems to work pretty well.  I've written a kanji writing recognition algorithm that takes kanji path data (vector format) and compares it with another path data to give a percentage score.  I have the code in c# and objective-c, if it would be useful to you I'd be happy to post it.

Thanks
Ray

Alexandre Courbot

unread,
Jun 16, 2009, 1:27:31 AM6/16/09
to tagain...@googlegroups.com
> Thanks for the tips.  I just merged the svg data with (jim breens?) kanjidic
> data and made an xml file for my iphone flash card application.

Nice! Be careful if you redistribute this file, as KanjiVG's licence
is Creative Commons Attribution-Noncommercial-Share Alike. You may
have a conflict if you are selling your application.

> I checked
> out your SVG references and wrote some iphone code to render the path from
> the SVG data, which seems to work pretty well.  I've written a kanji writing
> recognition algorithm that takes kanji path data (vector format) and
> compares it with another path data to give a percentage score.  I have the
> code in c# and objective-c, if it would be useful to you I'd be happy to
> post it.

Indeed, I'd be interested to see that code - that could be the start
of a new kanji recognition module. And I know about someone else who
asked for such code not so long ago.

Alex.

Raeldor

unread,
Jun 16, 2009, 11:07:21 AM6/16/09
to tagain...@googlegroups.com
Thanks, I'll check out the license agreement.  I may need to look for another data source, as I was hoping to put this up for sale eventually, though in the meantime it'll make some good test data.

I've attached the c# version of my flash card engine which has the KanjiDrawing class.  This contains a Compare function that returns a percentage of how close your drawing it to that of the kanji.  Path data is held as a list of strokes, each of which is a starting point plus a list of vectors.  C# is pretty easy to read, so it should be easy to re-engineer if another language if anyone finds it useful.  It basically breaks each stroke down into a sequence of vectors and compares the angle of each vector and then compares the position of the bounding box within the overall character bounding box.  It then uses these two number to compute the accuracy of the stroke.  Pretty simple but it works well in practice.

Thanks again for your help.
Ray
Grader.cs

Alexandre Courbot

unread,
Jun 16, 2009, 11:16:54 AM6/16/09
to tagain...@googlegroups.com
> Thanks, I'll check out the license agreement.  I may need to look for
> another data source, as I was hoping to put this up for sale eventually,
> though in the meantime it'll make some good test data.

Yeah, looks like the NC clause of the licence seems to be creating
problems anybody who wants to use the data. :p You may want to contact
Ulrich (unless he reads the messages here?), it is maybe not
impossible that the licence changes to Attribution-Share Alike, or
maybe you can negotiate special usage terms with him.

> I've attached the c# version of my flash card engine which has the
> KanjiDrawing class.  This contains a Compare function that returns a
> percentage of how close your drawing it to that of the kanji.  Path data is
> held as a list of strokes, each of which is a starting point plus a list of
> vectors.  C# is pretty easy to read, so it should be easy to re-engineer if
> another language if anyone finds it useful.  It basically breaks each stroke
> down into a sequence of vectors and compares the angle of each vector and
> then compares the position of the bounding box within the overall character
> bounding box.  It then uses these two number to compute the accuracy of the
> stroke.  Pretty simple but it works well in practice.

Thanks, I'll have a look - I was interested in such code, but too lazy
to do my own homework. Maybe we can build an input method on top of
KanjiVG, or at least this would be useful to implement kanji drawing
games similar to the ones you can see on Nintendo DS.

Alex.

Benoit Cerrina

unread,
Jun 16, 2009, 12:54:19 PM6/16/09
to tagain...@googlegroups.com
Hello Raeldor,
I am just wondering if you looked at http://shinkanji.bcerrina.com?
The reason I am wondering is that it sounds like the program you have in mind may be quite similar to what I offer.  
However yours would be more of a flash card program while mine is a dictionary.  I do have similar data to KanjiVG and a handwriting recognition.
I am wondering if we could discuss what you intend to have in your program and if both can be made complementary as opposed to concurrent we could
be sharing some of the code and data.
This would help with having better quality products as bugs found and fixed by one could benefit the other.

Best regards
Benoit
<Grader.cs>

Raeldor

unread,
Jun 16, 2009, 1:36:58 PM6/16/09
to tagain...@googlegroups.com
Hi Benoit,

Looks like a great program.  You seem to be very focused on the kanji, and have a lot more features in this area.  My application is more general.  I have a simple kanji dictionary, and also a simple regular dictionary.  From these the user can make their own lessons by picking words and kanji to drill in guessing games and writing games.  The handwriting recognition is used to drill the kanji, but also to write the entire words if the flashcard is a dictionary type.  After initial release, I plan to add a 'grammar dictionary' where users can make gramatical constructs to practice, and then as a further step can compound these into sample conversations.  From here I'll have more games such as 'guess the particle' etc.

May I ask what your path data source was?  I'm finding resources in this area hard to come by.

Thanks
Ray

Benoit Cerrina

unread,
Jun 17, 2009, 10:36:05 PM6/17/09
to tagain...@googlegroups.com
Hello,
yes I was initially very focused on Kanji, but I now have a full jmdict dictionary also.
There is however plenty of space for exercise and rehearsal app to help remembering japanese.  I know I've been asked for one several times.
About my data source, it is the taka database to which I am maintaining but which is open source.
In order to judge the quality of the database you would need to go past the applets and the website for taka and look at the data itself as the data has
been greatly improved since I am maintaining it but nobody is mainaining either the web site or the applet.

Best regards
Benoit

Raeldor

unread,
Jun 20, 2009, 11:53:02 AM6/20/09
to tagain...@googlegroups.com
Hi Benoit,

My flash cards are pretty simple affairs where you just slide your finger to flip the card and slide again to pull the next card onto the screen.  I'd be happy to post some source code for the iPhone application if you're interested.

I'm not familiar with taka, but I googled and found...

http://taka.sourceforge.net/

I didn't see anywhere to download the database though.  Do you know where I can get this and what format the stroke data is in?

Thanks
Ray
Reply all
Reply to author
Forward
0 new messages