News for hackers. Stuff that matters.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by patio11 on Monday December 28, 2015 @04:55PM (#10803621)
Stroke order is very important to Japanese culture, in a society where the process matters just as much as the end result. Some calligraphists take stroke order very seriously, and will probably explode if they see someone writing a Kanji with incorrect stroke order.

One might phrase this "Stroke order is assigned by convention in Japanese; deviating from the conventional order is incorrect, much laik hau Einglish speling iz nat ap four eendevizyuelle tyoise." ("What's the matter? You can sound it out. Pfft, Americans, such rigid traditionalists. It makes sense in the context of their religious views and conservative political tendencies, though." [+])

This avoids unfortunate Man Japanese People They're So Craaaaazy overtones. (FWIW: stroke order is prescriptionist not descriptionist but AFAIK prescriptionism has a virtually hegemonic mindshare among relevant authorities.)

n.b. Otherwise this project and post is freaking excellent.

[+] You can actually read Japanese-language takes on American culture which are exactly as bad as this Orientialism-in-reverse.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by emmett on Monday December 28, 2015 @05:04PM (#10803664)
I think a key point about this, which was only clear to me after I learned to write Hanzi in Mandarin, is that if you write the strokes in the wrong order it will not look right at the end.

To someone looking at characters for the first time, it's not obvious that the stroke order matters to the reader as spelling does in English. It's not about fetishization of the process over stroke order, it's really obvious to the reader if you wrote the character incorrectly.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by schoen on Monday December 28, 2015 @06:57PM (#10804245)
I've kind of wondered about how you can tell -- do you know of an example that's online anywhere that makes it clear how it looks different? (... when written with a pen or pencil?)
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by toufka on Monday December 28, 2015 @08:15PM (#10804542)
see: す - imagine if it were written from bottom to top. The placement of the 'straight' part of the vertical line and the placement of the 'curl' would be opposite (especially if you're using a brush instead of a pen). This is similar to the lowercase English 'a' or 'u' written bottom to top - especially if using cursive.

or see: お

the last 'dash' in the top right is a retouching of the paper after the curl on the bottom right. Imagine a swirl that starts in top middle, swings around on the bottom left, swings around on the bottom right, lifts off the paper, and then touches back down briefly in the top right. If you're hand-writing, that little landing dot can be huge, tiny, or even conjoined, but to be legible it's generally visually a continuation of the lower stroke. If you just copied the letter without any concept of stroke, it would be difficult to read because you'd be looking for that swirl. Imagine the dot on a lowercase 'i' - it's supposed to be directly above the stroke for your brain to render it as an 'i' vs an 'l'. It's why when written out you can distinguish 'il' and lt' even though they're quite similar if drawn literally, quickly.

An example of stroke order vs stroke direction is more apparent when you need good proportions. Kanji like 風 or 看 are really hard to 'draw' with good square proportions if you don't stroke them in a particular order. Kind of like trying to draw a face by starting with the nostrils, then doing the eyebrows, and ending with the outline of the face - it's tough.

Interestingly, the Japanese hiragana letters are really designed to be written with a brush from top to bottom. The letters flow from one to the next really nicely when written from top to bottom, and are actually much harder to write properly when written left to right. See: す - き - の. They're much more natural to write top to bottom, and keep going down rather than from a left to right (which is also indicated by stroke order - the horizontal bars on the letters above are written before the downstrokes).

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by timr on Monday December 28, 2015 @09:22PM (#10804786)
Ehhhh. This is all starting to sound rather speculative. People draw the lowercase 'a' in all sorts of different ways and end up with an equally valid result. There's no particular reason why drawing す from bottom-to-top would require that the shape be different. You just have to know the shape.

I also don't buy Emmett's claim. There are regional differences in stroke order, even for hanzi. Japanese people use a different stroke order for kanji than mainland Chinese people use for hanzi, which again is different than the stroke order used by people in Taiwan and Hong Kong. The differences implied by these things are smaller than the differences in CJK fonts, which have no inherent "order" at all, yet people somehow manage to read.

Stroke order matters for calligraphy and memorization and dictionaries, but as patio11 says, it's largely just prescriptive. Spelling is prescriptive, too: it's historically and/or conventionally derived, but knowing the rules makes learning words easier, and you certainly can't use a dictionary without it.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by toufka on Monday December 28, 2015 @09:42PM (#10804859)
It's not about what can be done, it's about where the ragged edges are, and where the core is. If you put any squiggle in the top of す it will make no sense. But you can do nearly anything you want with the bottom half and it will make sense (like an English 'j'). It's not that the stroke order is sacrosanct - there are indeed a lot of ways to write an 'a' in English. But some of those ways will not be well-read by others. Those regional differences can be really confusing. Ask a french person to write the numbers 1 and 7, and then an American. They are nearly exclusively legible precisely because of their orthographic rules. And yet 'people somehow manage to read'.

The hard and fast rules are prescriptive, but once you start writing, you realize that some of that prescription ends up as description. There really are detectable orthographic differences in how stroke order affects (generally, of course) how people write.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by princeb on Tuesday December 29, 2015 @01:04AM (#10805483)
children have penmanship work in the earlier years of learning the chinese language but that stops within a few years. what about all the characters that they pick up after penmanship work ends? there is some intuition to the stroke order that guides the writing of more elaborate characters, that is maybe picked up in the formative years. and the intuition seems extremely consistent among users of the language.

i have not met anyone who did not learn the chinese language without doing penmanship work, and so i cannot say what it means to ignore the stroke order when writing chinese. if one were to pick up the latin alphabet with an unusual stroke order and were to carry that habit to adulthood, will we find his handwriting difficult to read? if he managed to train his hands to write with a most unusual method will he still write perfectly legibly, and can we even distinguish his stroke order if we were to inspect it carefully? i don't know the answer to this. out of curiousity i wrote the alphabet with a totally unfamiliar stroke order (e.g. starting the y's and g's from the bottom) and it looked as if i wrote it with my off hand - unsteady and unpracticed - which seems to suggest that maybe with some effort it could look totally similar. i can believe that without stroke order guidance one could still achieve legible chinese writing.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by xiaoma on Tuesday December 29, 2015 @12:16AM (#10805341)
There are some minor differences in stroke order by region, but the basic rules are always the same (e.g. top before bottom, left before right, etc).

It's genuinely hard to read people's writing if the stroke order is off.

If you write super slowly and deliberately it may not matter much, but in my actual real-life usage I've found that it does. If you're learning, you're definitely better off learning the standard stroke order for the area where you live.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by timr on Tuesday December 29, 2015 @03:14PM (#10808785)
I mean, sure...there's a gray area here. I could theoretically write all of my latin characters from right-to-left, but it would be wonky and hard, if only because english is written from left to right.

I believe there's a reason for the rules and that you need to know them. I think patio11's metaphor is the correct one -- it's a lot like english spelling.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by emmett on Tuesday December 29, 2015 @02:10AM (#10805645)
Of course it's prescriptive and there are regional differences. As you say, it's just like spelling. "Colour" still looks wrong to me. Just like a different stroke order looks wrong to a native reader. The point is the differences are visible to the reader, it's not just an arbitrary set of rules for writers. The reader can tell if you're following the rules or not.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by timr on Tuesday December 29, 2015 @03:06PM (#10808747)
I think you're right that there are certain characters where drawing it the "correct" way leads to a better result, and that there's a reason for the rules (i.e. that the rules are rationally derived). Using the correct order is also probably faster. I think the spelling metaphor is a good one.

I doubt your last claim in the general case, and I think the GP comment in particular is taking things too far -- there's no way that the average Japanese reader is going to be able to tell the stroke order used to write ぉ (in handwriting scenarios, not calligraphy), so long as you don't mess up the form of the thing.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by kingkawn on Monday December 28, 2015 @10:43PM (#10805062)
It's their culture. There is no Chinese without People making it, and the people who made it say this is how it goes. There can't be a higher or lower analysis of the topic since it exists to be analyzed at all through their efforts to give it meaning.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by yaowenjiaozi on Monday December 28, 2015 @07:58PM (#10804462)
The blog post's image on a child's struggle is kinda sorta one example. It shows the pencil at the last stroke of the bottom right character and that stroke order is wrong. Correct stroke order is shown here: https://en.m.wiktionary.org/wiki/%E6%88%90

To answer your question, if the image doesn't show the pencil positioned on that last stroke, I'd say that the characters don't look right and may infer but cannot tell for sure that they were written using incorrect stroke orders.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Tuesday December 29, 2015 @03:46AM (#10805824)
Maybe this can be another machine learning problem.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by ericjang on Monday December 28, 2015 @05:51PM (#10803899)
Admittedly, there's real danger when a cultural majority uses "weirdness" as a value judgment on immigrants and foreigners.

But...

If hardmaru's remark about Japanese culture ("a society where the process matters just as much as the end result") is incorrect, I'd prefer to see that idea challenged for accuracy, rather than labeling it as "hegemonic".

The remark about calligraphers exploding was a joke - even in Japan/China, there's the stereotype that calligraphers are fussy perfectionists. My grandfather was a calligrapher for the Taiwanese govt for many years and he'd probably explode too, if he saw any of my Chinese handwriting.

Cultures are inherently different, and I think it's okay to point out oddities in one's culture or someone else's. hardmaru seems to have lived in Japan long enough to be credible on this matter, and I have no reason to suspect bad intentions.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Monday December 28, 2015 @09:01PM (#10804722)
my grandfather would turn over in his grave if he saw my Chinese handwriting too :)
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by wodenokoto on Monday December 28, 2015 @05:28PM (#10803786)
That was a joke. And there are several of them throughout the post.

But anyway, I'll bite: stroke order is in no way comparable to your examples. It's comparable to whether you start "5" with the vertical or horizontal line, or an "8" at the top or the bottom.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by jpatokal on Monday December 28, 2015 @05:42PM (#10803840)
Funnily enough, I've been chewed out in Japan for writing my Latin numerals "wrong"!

(Also, are there really people who start an 8 at the bottom...?)

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by dmd on Monday December 28, 2015 @05:53PM (#10803915)
... are there people who start it not at the bottom!?
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by jpatokal on Monday December 28, 2015 @10:29PM (#10805017)
I start all my digits at the top, why would I make an exception for 8?

http://jp2.r0tt.com/l_c1714080-82ad-11e1-9f79-1ff907600002.j...

...except that I draw bars for the 7's as taught in Finnish elementary school, which is clearly Wrong(tm) per the above instructions:

https://en.wikipedia.org/wiki/7_(number)#Evolution_of_the_gl...

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by michaelbuddy on Tuesday December 29, 2015 @02:31AM (#10805677)
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by cgm616 on Monday December 28, 2015 @09:08PM (#10804745)
I know people that draw two circles, one on top of the other.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Monday December 28, 2015 @09:03PM (#10804730)
maybe I went too far with the cultural jokes compared to typical papers written on machine learning- I meant no harm, hopefully I didn't offend too many!

I love living in Japan, and everything about Japanese culture (even Japanese company culture..), sometimes I just poke a little fun at it..

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by spooningtamarin on Tuesday December 29, 2015 @03:25AM (#10805782)
I can't sound it out. I'm used to a phonemic orthography.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by joe_the_user on Monday December 28, 2015 @04:44PM (#10803577)
About the reference in article to deep learning producing art:

The thing is that what a current net is doing is very simple. It's just extrapolating from a set on a high dimensional feature space.

There's no meaning here and so it's hard to generating a bunch of pseudo-data as art. It's fun and interesting when you do it a few times so any semi-random technique like ink blots or fractals but if you produce a steady stream of something like that, it's unoriginal, non-artistic qualities become more obvious.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Monday December 28, 2015 @10:33PM (#10805029)
We were actually sort of discussing this a short while back

https://twitter.com/hardmaru/status/676067023655337984

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by anon4 on Monday December 28, 2015 @05:50PM (#10803893)
If a urinal on a pedestal can be art, I think we've lost the fight when it comes to the word having any meaning.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by trhway on Monday December 28, 2015 @04:21PM (#10803462)
>suddenly realise they forgot how to write Kanji. I am also guilty of this – even though I read a lot of Chinese and Japanese content in my everyday life, I struggle to write Chinese characters. What we notice is that while we can definitely read and recognise the characters we are able to write, the converse is certainly not true.

when written in ink by brush the order of strokes seems to follow very natural flow, yet when it is taught using pencil it looks much less natural.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by zhemao on Monday December 28, 2015 @09:16PM (#10804768)
It's not about stroke order. You just forget how it should look. It's like the difference between being able to recognize someone's face and being able to draw it from memory.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by trhway on Monday December 28, 2015 @11:15PM (#10805159)
Thanks. I did feel that my interpretation wasn't enough.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Tuesday December 29, 2015 @03:42AM (#10805817)
Is that why the shape of the fake pen for that Bimoji Kanji Writing NDS video game shaped like a brush?
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by vvpan on Tuesday December 29, 2015 @03:50AM (#10805832)
"Dreams up" sounds a lot like modern "handcrafted with love" marketing.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by teddyh on Monday December 28, 2015 @06:22PM (#10804081)
'Twas brillig, and the slithy toves

Did gyre and gimble in the wabe;

All mimsy were the borogoves,

And the mome raths outgrabe.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by niccaluim on Monday December 28, 2015 @08:21PM (#10804568)
I wonder what RNN-generated fake Latin characters would look like. Sort of a handwriting version of that "what does English sounds like to non-English-speaking people" video. (https://www.youtube.com/watch?v=Vt4Dfa4fOEY)
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Monday December 28, 2015 @09:05PM (#10804734)
I reproduced an English handwriting generation experiment in the previou post.

http://blog.otoro.net/2015/12/12/handwriting-generation-demo...

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by PhasmaFelis on Tuesday December 29, 2015 @04:49AM (#10805966)
My first thought was that, to me, Cyrillic looks how I'd expect fake Latin characters to look. Clearly related, made of the same elements, but I don't recognize most of the characters...
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by JulianMorrison on Monday December 28, 2015 @09:16PM (#10804767)
Mostly like real ones, I expect. We don't have root components to our characters except long and short line, circle, hook, arc, angle, so there aren't many missed opportunities for a longer alphabet. You'd need to run fakeness at the level of words, after teaching it about etymological roots.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by aftbit on Monday December 28, 2015 @03:51PM (#10803297)
The more I read about machine learning using neural networks, the more I realize that we've just moved the "decisions" up into the choice of architecture and hyperparameters. This blog post describes a process of tuning the neural network until it generates Kanji that "look right" to the author.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by gertef on Monday December 28, 2015 @03:59PM (#10803343)
> just

That's a small word for major change in programming paradigm

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by habitue on Monday December 28, 2015 @11:11PM (#10805144)
What's interesting though is that debugging hyperparameters like this is much more at the level of human thought, rather than the nitty-gritty of programming. It's much closer to the Star Trek concept of programming

"Computer, create fake chinese characters. These don't look right, stop drawing earlier. Ok, cut out all that are outside a one inch by one inch square."

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by sago on Monday December 28, 2015 @11:31PM (#10805215)
"No, not like that. Why are you doing that? What on earth is causing that? What can I do to change it? I'll throw away the ones that don't work - oh, there are none left. Has it stopped working? Why is it eating 100% CPU and not spitting out any results?"

One of the earliest games projects I worked on with learning AI scrapped the learning AI because it had a habit of sometimes, but rarely, causing the characters to run into the corner of a room and stay there until shot. Nobody had the slightest clue how to 'debug' the neural network to solve the intermittent issue.

It's all fun and games when things are going well. But like Jurassic Park, when it comes to paying customers, eventually there will be running, and screaming.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Tuesday December 29, 2015 @03:45AM (#10805819)
The problem with this particular algorithm is that I needed to have a lot of data to make it sort of work. I'm not sure how your AI was trained to play that game, sounds like a difficult problem-
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by habitue on Monday December 28, 2015 @11:50PM (#10805267)
Yeah, it's definitely not there yet. And quite a few Star Trek episodes center around ambiguities in this kind of "programming".
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by tel on Monday December 28, 2015 @05:00PM (#10803645)
Of which there are usually far fewer and of which we can recursively apply ML techniques to fit.

So yeah, but it works really well.

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by ziyao_w on Monday December 28, 2015 @04:19PM (#10803453)
Pretty cool - some of the characters are actually real Chinese characters.
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by est on Monday December 28, 2015 @08:26PM (#10804587)
http://hanja.naver.com/

Here's a korean site providing many Hanja/Kanji/Hanzi stroke orders

Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by hardmaru on Monday December 28, 2015 @09:07PM (#10804739)
Cool, I wonder how difficult it would be to extract all of the stroke data. LINE would probably not put the data on github..
Re:Recurrent Net Dreams Up Fake Chinese Characters in Vector... by thrownaway2424 on Monday December 28, 2015 @05:45PM (#10803862)
Maybe this can be used to generate embarrassing nonsense tattoos for idiotic Americans.