Kuro5hin.org: technology and culture, from the trenches
create account | help/FAQ | contact | links | search | IRC | site news
[ Everything | Diaries | Technology | Science | Culture | Politics | Media | News | Internet | Op-Ed | Fiction | Meta | MLP ]
We need your support: buy an ad | premium membership

[P]
Japanese for Nerds (II)

By rtmyers in Culture
Fri Mar 26, 2004 at 09:47:27 AM EST
Tags: Culture (all tags)
Culture

This is the second article in the series "Japanese for Nerds". We will introduce a stack-based Japanese computer language, the notion of keyword parameters in Japanese, and give a BNF description of Japanese. We will also present two of the key recursive grammar rules which make Japanese so easy for nerds.


This is the second of a promised three articles. We have a lot to cover, so we will be moving fast. Also, some of the promises we made in the first article we failed to fulfill (such as presenting Japanese using Backus-Naur form), and frankly, we skipped over some things and told a few fibs. So we have to clear those up as well. Thanks to everyone for their constructive comments.

In any case, this series began with the assertion that Japanese has meaningful similarities to computer languages which make it amenable to learning by geeks. I know that this is true. For instance, the author of an early version of Emacs learned the basic structure of Japanese from me in about two hours with the help of a syntax diagram I wrote on the back of an envelope, and was chatting up girls later that evening with the help of a little dictionary. He ended up with a girl who actually found his bushy nose hair attractive.

The Japanese programming language MIND

But there is another good demonstration of how much Japanese is like a computer language, in the form of the amazing Japanese computer language called MIND (warning, site is in Japanese). Here's a sample program:

1 NI 2 WO TASU. INSATSU SURU.

This has been converted into Roman characters, called "romaji" in Japanese. Real MIND programs were written in real Japanese. In any case, this is an actual, speakable, real-world Japanese sentence. On a word-by-word basis, it means

1 to 2 (obj) add. print do.

The alert reader might think of the following dc program:

1 2 + p

Which in fact corresponds exactly to this MIND program. Actually, in MIND the NI, meaning "to" and placed after the word it applies to (in other words, being a "postposition" rather than a "preposition") is ignored as a noise word, as is the WO (object marker), also placed after the word it applies to. The "do" is also treated as noise.

This could just as easily be a FORTH program. Actually, it is a FORTH program. That's what MIND is, just an implementation of FORTH with some syntactic sugar designed to make the programs look and read quite close to actual Japanese. Its very existence proves that Japanese is, in fact, syntactically nearly identical to a stack-based computer language.

MIND, for better or for worse, never caught fire. It was apparently a solution in search of a problem. It was marketed in all the predictable ways, ranging from supposedly being the programming environment for the linuistically-challenged ("If you speak Japanese, now you can program computers!"), to the thinly-veiled nationalistic kamikaze response to the programming languages foisted on Japan by the white devils.

The Japanese do Polish

But what exactly is the nature of the TASU (add) word in the program above? In FORTH terms, it's an operator, and this is the terminology we'll adopt (although in the first article we referred to NA-I, the word meaning "doesn't exist", as a "functor", whatever that was supposed to mean; actually, it's really also a member of this family of operators). It pops some arguments off the stack (two in this case), takes them and does something, and possibly leaves something on the stack itself, in this case the result of the addition. Just like in FORTH-like languages, arguments always are "pushed" onto the stack before the operator that processes them. This is an absolute invariant in Japanese grammar. They were doing reverse Polish four thousand years ago.

Named keywords

In mathematics, addition, of course, is a commutative operation taking just two parameters, so there is no concept of keyword or named parameters. That's why MIND can just strip off the markers on the two arguments to the addition operator. In general, though, Japanese does place markers on arguments. There's a standard order, but using the markers allows non-standard ones as well. We completely neglected to discuss these markers in our first installment, trying to justify doing so with the lame comment that omitting the markers could increase the sexual attractiveness of the speaker, Actually, the markers ideally should not be omitted, although in some cases using them overly zealously can make you sound like have a stick up your ass, which has been known to reduce sexual attractiveness. In any case, there are about five we'll need to learn. One of the major ones is GA, which indicates what in English we'd usually think of as the subject of the sentence; in Fillmore's semantically-oriented "case" logic, it indicates the agent of an action, or the entity whose state is being described:

BOKU GA TASU
tasu (ga=boku)
I add

Another one we used in the example above is WO (pronounced O), for object:

ICHI (1) WO TASU
tasu (wo=ichi)
add one

Or, they can be combined:

BOKU GA ICHI (1) WO TASU
tasu (ga=boku, wo=ichi)
I add one

There's another vital named parameter, which is WA, and specifies the topic and focus of the phrase:

BOKU WA NAI
nai (wa=boku)
On the topic of me, there is none
= I don't have any

And combining WA and GA:

BOKU WA KANE GA NAI
nai (wa=boku, ga=nai)
On the topic of me, money does not exist
= I don't have any money

The alert reader will notice that this NAI is the word introduced in the previous installment, meaning "doesn't exist". Now we are attaching named parameters to it, just like we did to TASU (add). That's right. NAI is a "predicate", describing a state of affairs or an action, just as TASU is, even though in English TASU would usually be considered a verb, while NAI would be considered an adjective. This concept of predicate is key to the BNF grammar we present below.

Review

As a review now, remembering the variations we learned in lesson one, let's translate these sentences into Japanese now:

  1. I didn't have any money
  2. I add the bug [to the list of bugs]
  3. If the program was horrible

1. Recall the Past() transformation applied to words like NAI, making them NAKATTA. The entire sentence is then just BOKU WA KANE GA NAKATTA.

2. Remember the word BAGU (bug) from last lesson. SO this is just BOKU WA BAGU WO TASU.

3. Remember the word HIDOI (horrible), and the If() translation applied to that type of word, making it HIDO-KEREBA. So the whole sentence is simply PUROGURAMU GA HIDOKEREBA.

Summary

To summarize, we've learned:

  1. Japanese predicates come in two flavors. There are the ones ending in -I, like NAI. We learned how to make those negative, and past, and conditional. There are the ones like TASU, which correspond to verbs, which we haven't learned how to transform yet.
  2. Predicates take keyword arguments, all coming before the predicate, and each keyword coming after its value. The important keywords are WA, GA, WO, NI, and DE.

These keywords have a broader semantic span than their English cousins the prepositions--making them that much easier to learn. (In fact, most Japanese words have broad semantic span: Japanese partitions the world coarsely. But that is another article.) NI covers all kinds of temporal and spatial directionality and locality of state. DE covers all kinds of instrumentality and locality of action (Maxwell GA gakkou (school) DE hammer DE).

As an aside, a true nerd would attempt to express the similarity between the facts that predicates/operators are placed after their keyword/value pairs, and the fact that the keyword name is placed after its value, by treating the keyword name as a mini-predicate, which sucks up its value as an argument and leaves on the stack a semantic object giving the role corresponding to the keyword name to the value

In other words, BOKU WA is conceived of as WA(BOKU) and evaluates to [#topic, me]. In this model, the sentence BOKU WA KANE GA NAI is processed as shown below, a new token being pushed onto the stack at each step, and the result if any shown after =>:

  • BOKU
  • BOKU WA => [#topic, me]
  • [#topic, me] KANE
  • [#topic, me] KANE GA => [#topic, me] [#object, money]
  • [#topic, me] [#object, money] NAI => (NOT, {[#topic, me], [#object, money]})

My goodness. It almost looks like we have a machine translation system on our hands here. All that's missing is a simple English sentence generator...

Japanese in Backus-Naur form

Actually, what better way to summarize than to roll out that heaviest of nerdistic heavy artillery, Backus-Naur form. Comments and examples follow each rule:

<noun> ::= boku | kane | bagu | puroguramu | ichi
<keyword> ::= wa | ga | ni | wo | de
<adjective-base> ::= na- | sugo- | hido- | <adjective-negative>

These are just the lexical items we've learned so far, with one exception: the negativization of an adjective, such as NAKU NA-I, that we learned last time, is itself an adjective and subject to all the normal ways to transform it.

<verb> ::= tasu

The only lexical item in this category we've learned so far.

<adjective-present> ::= <adjective-base> I

NAI (doesn't exist), SUGOI (amazing), HIDOI (horrible).

<adjective-conditional> ::= <adjective-base> KEREBA

NAKEREBA (if it doesn't exist), SUGOKEREBA (if it's amazing), HIDOKEREBA (if it's horrible).

<adjective-past> ::= <adjective-base> KATTA

NAKATTA (it didn't exist), SUGOKATTA (was amazing), HIDOKATTA (was horrible).

<adjective-negative> ::= <adjective-base> KU NA

After adding the final I, this rule generates words like NAKU NA-I (didn't not exist), SUGOKU NA-I (wasn't amazing), HIDOKU NA-I (wasn't horrible).

<adjective> ::= <adjective-present> | <adjective-past>

NAI (doesn't exist), NAKATTA (didn't exist). The adjectival form that can be a whole sentence by itself (predicate).

<predicate-head> ::= <adjective> | <verb>

NAI (doesn't exist), TASU (add).

<role> = <noun> <keyword>
<rolelist> ::= NULL | <role> | <role> <rolelist>
<predicate> ::= <rolelist> <predicate-head>

This final rule generates all the example sentences presented so far in this series.

The heart of Japanese grammar

But we've left out a couple of the most interesting things in Japanese:

<noun> ::+ <predicate> KOTO

The ::+ notation indicates that this is another way to create a noun. In other words, we can take any predicate and simply by adding KOTO on the end, THING-ize it and make it into a noun. Let's take an example:

BOKU WA KANE GA NAI KOTO WA HIDOI

Parsing:

((BOKU-WA KANE-GA NAI) KOTO)-WA HIDOI
HIDOI ([#topic, THING (NOT ([#topic, me], #subject, money])))

This is not hard--it just means "It's horrible that I don't have any money." "The fact that I don't have any money is horrible." Voila: instant relative phrases and gerundal phrases.

Finally, an even more interesting rule, which could be said to be the pre-eminent grammar rule in Japanese:

<noun> ::+ <predicate> <noun>

In other words, any predicate can modify any noun to create a noun phrase. Of course, a simple sentence like AOI INU is a perfectly good example of this rule, but that just means "GREEN DOG". More interestingly:

BAGU GA NAI PUROGURAMU
(BAGU-GA NAI) PUROGURAMU
PUROGURAMU ([#mod, NOT(#subject, BAGU)])
That's right: the program without any bugs. In other words, once you have learned to say there are no bugs, you can immediately use this to describe something, in the form the there-are-no-bugs program. Imagine the possibilities. Consider the I-wrote-today K5 article, or the I-saw-on-the-I-always-walk-street dog.

Homework

We will leave you with the homework assignment to translate this sentence into English:

BAGU GA NAI PUROGURAMU WA NAI

We will give the answer in the third and final installment, where we will deal with:

  1. the highly regular system of Japanese verbs
  2. particles that go on the end of sentences to show questioning or emphasis
  3. quoting, the way to talk about what people are saying or thinking
  4. how to use English words in Japanese
  5. using NO, the all-purpose noun combiner

and, in general, pull everything together.

Sponsors

Voxel dot net
o Managed Hosting
o VoxCAST Content Delivery
o Raw Infrastructure

Login

Related Links
o first article
o MIND (warning, site is in Japanese)
o dc
o Backus-Nau r form
o Also by rtmyers


Display: Sort:
Japanese for Nerds (II) | 87 comments (78 topical, 9 editorial, 2 hidden)
OHIO..... HAI! (1.00 / 27) (#2)
by Hide The Hamster on Thu Mar 25, 2004 at 07:00:04 AM EST

OOooooh, Mista Eddie fatha, would you to preese teacha Eddie resson? I heva to smokes my opium and prepare Eddie runch! I drive car very poor-ry to grocery store! Me do karate and put shrimp fried rice over bed of rettus! -_-

       A
   _,-' `-._
_-'_________`-_
``---\_ _/---``
    (_ - _)
     \_._/ 8
     __H__  8
    \  |  /  8
    |\ | /|  8
   _|_|||_|_8
  `-,/   \,-'8.
     |   |    `8{
     |   |
     |-,-|
     '-'-'



Free spirits are a liability.

August 8, 2004: "it certainly is" and I had engaged in a homosexual tryst.

I think... (none / 3) (#6)
by the highwayman on Thu Mar 25, 2004 at 11:30:37 AM EST

...only the Vietnamize wear those funny hats.

[ Parent ]
R0Ral0fffffle (none / 2) (#21)
by noogie on Fri Mar 26, 2004 at 07:33:52 AM EST




*** ANONYMIZED BY THE EVIL KUROFIVEHIN MILITARY JUNTA ***
[ Parent ]
Hm. (2.75 / 4) (#4)
by BJH on Thu Mar 25, 2004 at 08:52:15 AM EST

This one's more interesting than part 1, for sure.

One thing: in the "BOKU WA KANE GA NAI KOTO WA HIDOI" construction, the initial 'wa' would normally be a 'ga' (actually, an even more normal construction would be to omit it). Having a 'wa' in there makes the 'boku' seem rather unconnected to the following phrase.

--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

No, wa not ga. (none / 1) (#33)
by sakusha on Fri Mar 26, 2004 at 04:41:20 PM EST

No, you can't say "boku ga kane ga nai koto wa hidoi," it's ungrammatical, that would be assigning two subjects to the sentence, which does not work. Two ga in one sentence like that is forbidden. You could say "boku NO kane ga nai.." depending on what the hell this guy is trying to say, which is so incomprehensible due to the author's massive grammar errors and his general lack of knowledge of the Japanese language. Yes, normally the boku wa would be omitted, the koto is a nominalizer which indicates the sentence is speaking in the abstract sense. So it means "having no money sucks." It would NOT mean "when I have no money, it sucks." Wa is most correctly translated "as for me," so this sentence most likely is an ungrammatical way of saying "as far as I'm concerned, having no money sucks." If he wanted to say what I think he means, he'd more likely say "kane ga naku nattara, hidoi."

[ Parent ]
What's interesting though... (none / 1) (#39)
by lordpixel on Fri Mar 26, 2004 at 07:29:49 PM EST

... is reading the "correct" sentence you propose, given I have almost no knowledge of Japanese:

"kane ga naku nattara, hidoi."

Whatever the shortcomings of the method described in the article, I can understand this sentence, and why it is put together the way it is, with only one exception:

I have no idea why you have "nattara". Given the sentence expresses a negative, it looks like it might be related to nakatta, but I don't know. I'm sure there's a good reason :)

That I can read anything at all is an amazing feat given how short the articles are. There's no substitute for learning the correct way to say things, but it is interesting to me to see how this method of teaching can help one comprehend the basic sense of some things rather quickly. Reading is always easier than writing.

I am the cat who walks through walls, all places and all times are alike to me.
[ Parent ]

-ttara (none / 1) (#42)
by sakusha on Sat Mar 27, 2004 at 01:22:41 AM EST

Yes, it's easy to understand something incorrectly, based on overly simplified explanations. You can understand how the example sentences are put together, except nobody actually puts together sentences like that in the real world. Which is my whole beef with this series of lame articles. These artificial constructs are not useful in actual language use, nor are they useful as a stepping stone to more advanced language proficiency. They are useful for giving you a mistaken impression that you can understand Japanese.
Naku naru is a very common idiomatic verb form, literally it means "to become absent." -ttara is another common verb ending, it has nothing to do with the past tense form like nakatta. "Kane ga naku natta" means "my money is gone." But "kane ga naku nattara" means "whenever my money is gone..." and is used as in "whenever you Verb-ttara, consequence." So literally "kane ga naku nattara hidoi" means something like "whenever your money becomes absent, the consequence is that it sucks." This is how people actually use Japanese language in real life.

[ Parent ]
Ha... ha... ha. (none / 1) (#44)
by BJH on Sat Mar 27, 2004 at 04:39:06 AM EST

This is how people actually use Japanese language in real life.

Considering how your previous attempts at displaying your knowledge of "real life Japanese" have turned out, I'm sure most people here would find that hard to believe.

I'm still trying to decide whether you're just a troll who pretends to know something about Japanese, or a delusionary who's convinced that they do know something about Japanese, all evidence to the contrary.
--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

[ Parent ]
Yeah right. (none / 0) (#54)
by sakusha on Sat Mar 27, 2004 at 03:58:25 PM EST

A bunch of amateurs disputed language I actually heard in Japan. Sorry I can't convince them. I don't have time to argue with flamers like you, I'm busy packing for a trip to Japan. I'll be over there long enough to learn that despite my degree in Japanese and a decade of studies, I am only a newbie. Too bad the amateurs with only a couple of semesters of study don't realize that.

[ Parent ]
Well, then... (none / 0) (#62)
by BJH on Sun Mar 28, 2004 at 08:31:45 AM EST

Come and look me up when you're over here and I'll be able to figure out the answer (as to whether you're a troll or a mental case).
--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

[ Parent ]
You Are Incorrect, Sir (none / 1) (#45)
by Juppon Gatana on Sat Mar 27, 2004 at 09:35:44 AM EST

You're overlooking the fact that "ha" and "ga" do not necessarily indicate a subject.

Example:
(Anyone who actually has this conversation should be punched in the face.)

A: Sukejuuru ha dou desu ka?
(How's your schedule?)
B: Kyou ha chotto ishogashii desu.
(It's a bit busy today.)
A: Aa, sukejuuru ga isogashii no ha taihen desu yo ne.
(It tough to have a busy schedule, isn't it?)

In this context, ha and ga do not indicate the subject. I think the problem originates from that the fact that you seem to be attempting to parse English grammar rules directly onto Japanese, which generally doesn't work very well.

- Juppon Gatana
能ある鷹は爪を隠す。
(Nou aru taka wa tsume wo kakusu.)
[ Parent ]
Fuck, Fuck, Fuck (read this first) (none / 1) (#46)
by Juppon Gatana on Sat Mar 27, 2004 at 09:42:22 AM EST

My mistake. The third example sentence should read:

A: Aa, kyou ga isogashii no ha zannen desu ne. Konpa ga aru n desu yo.
(It's too bad that you're busy today. There's a party.)

Thus, in B's line, and in A's second line (the first sentence) ga and ha are used such that they do not indicate the subject.

Note also that the word for "party" in this case ("konpa") is a hilarious contraction of the phrase "convivial party."

Phew.

- Juppon Gatana
能ある鷹は爪を隠す。
(Nou aru taka wa tsume wo kakusu.)
[ Parent ]
I agree (none / 1) (#63)
by tetsuwan on Sun Mar 28, 2004 at 10:29:13 AM EST

However, I have never heard a Japanese in my generation, that is people in their 20:s, use the word "konpa". Paatii is by far the most common.

Njal's Saga: Just like Romeo & Juliet without the romance
[ Parent ]

Well then... (none / 1) (#66)
by BJH on Sun Mar 28, 2004 at 01:03:34 PM EST

Try going to a Japanese university. "Konpa" was about the only word you needed to know for the first year or so...
--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

[ Parent ]
Yep (none / 1) (#68)
by Juppon Gatana on Mon Mar 29, 2004 at 12:29:59 AM EST

People definitely use "paatii" more often here (Doshisha University in Kyoto), but I hear "konpa" every now and then for sure.

- Juppon Gatana
能ある鷹は爪を隠す。
(Nou aru taka wa tsume wo kakusu.)
[ Parent ]
OK, I give (none / 1) (#73)
by tetsuwan on Tue Mar 30, 2004 at 03:07:41 AM EST

Maybe I heard "konpa" once or twice during my year at the University of Tokyo. But my fellow engineering physicists were not the most frequent party attenders ...

(Incidentally, the first time we had a nomikai with the lab, one of the master students ended up going to the hospital ...)

Njal's Saga: Just like Romeo & Juliet without the romance
[ Parent ]

Hey... (none / 1) (#74)
by BJH on Tue Mar 30, 2004 at 06:57:14 AM EST

It's not a real konpa without at least one acute alcohol poisoning victim!
--
Roses are red, violets are blue.
I'm schizophrenic, and so am I.
-- Oscar Levant

[ Parent ]
If I only (none / 1) (#75)
by tetsuwan on Tue Mar 30, 2004 at 09:28:00 AM EST

had been a real undergraduate when I was at UT ... instead I had a lot of hard work and not much play. But it was excellent anyhow, so I shouldn't complain.

Njal's Saga: Just like Romeo & Juliet without the romance
[ Parent ]

Quiet fool (1.41 / 31) (#5)
by Stick on Thu Mar 25, 2004 at 09:11:03 AM EST

You'll incur the wrath of the yellow hordes for speaking their secrets so openly.


---
Stick, thine posts bring light to mine eyes, tingles to my loins. Yea, each moment I sit, my monitor before me, waiting, yearning, needing your prose to make the moment complete. - Joh3n
i pity the fool that mods stick down. (1.25 / 4) (#20)
by noogie on Fri Mar 26, 2004 at 07:32:53 AM EST

unless its me.


*** ANONYMIZED BY THE EVIL KUROFIVEHIN MILITARY JUNTA ***
[ Parent ]
And you ain't gettin' on no plane [nt] (1.75 / 4) (#23)
by Stick on Fri Mar 26, 2004 at 10:08:42 AM EST




---
Stick, thine posts bring light to mine eyes, tingles to my loins. Yea, each moment I sit, my monitor before me, waiting, yearning, needing your prose to make the moment complete. - Joh3n
[ Parent ]
dont gimme no back talk sucka (1.25 / 4) (#24)
by noogie on Fri Mar 26, 2004 at 10:25:57 AM EST

if it was ur bday and i knew u i would buy u this (not goatse)


*** ANONYMIZED BY THE EVIL KUROFIVEHIN MILITARY JUNTA ***
[ Parent ]
Stop all dis jibba-jabba! (none / 2) (#40)
by BadDoggie on Fri Mar 26, 2004 at 07:50:50 PM EST

I pity da fool, who pisses me off! Dat ain't right, Hannibal, and you know it. You tell dat crazy fool Murdoch ta keep away from me!

woof.

"Eppur si muove." -- Galileo Galilei
"Nevertheless, it moves."
[ Parent ]

Do Japanese write Java script (2.40 / 5) (#10)
by Pop Top on Thu Mar 25, 2004 at 02:05:15 PM EST

in Japanese?

Nope, English AFAIK (N/T) (none / 3) (#13)
by Elendale on Thu Mar 25, 2004 at 05:32:14 PM EST


---

When free speech is outlawed, only criminals will complain.


[ Parent ]
Holy crap (3.00 / 11) (#14)
by ZorbaTHut on Thu Mar 25, 2004 at 06:07:30 PM EST

I took Japanese for about a year, and did horribly. I never noticed it was stack-based. If my teachers had mentioned that ONCE, I would have done *so* much better.

Can I give this +2fp? Please?

Similarly, when I was studying Latin... (none / 3) (#38)
by the on Fri Mar 26, 2004 at 07:03:15 PM EST

...if someone had pointed out to me that the arguments to a verb aren't positional but tagged by case, like Ada or VHDL as opposed to C, I might have actually understood why I had to learn those seemingly stupid declension tables. COme to think of it I remember a whole lot of French suddenly dropped into place when I figured out the recursive nature of grammar in general. I think we need more geeks writing language textbooks.

--
The Definite Article
[ Parent ]
I don't know.. forth? (none / 2) (#16)
by Mysidia on Fri Mar 26, 2004 at 01:19:15 AM EST

With all the strange glyphs used in the Japanese alphabets, a better analogy might be uh... machine language, except with 100x as many instructions as the x86 and without the benefit of assembly language mnemonics for everything



Or perl (none / 0) (#34)
by salsaman on Fri Mar 26, 2004 at 05:26:17 PM EST

:-) n/t

[ Parent ]
You'd be surprised (none / 2) (#41)
by ttfkam on Fri Mar 26, 2004 at 08:25:39 PM EST

...how far you can get with just hiragana and katakana, the phoenetic alphabets. I've found that I can get the jist of many Japanese newspaper articles and advertisements even without knowing many kanji characters. And learning hiragana and katakana shouldn't take all that long. Just make sure you learn stroke order while practicing.

Katakana is often used for borrowed (non-Japanese-origin) words. Just say them out loud and you'll find that they often sound like something recognizable to an English speaker.


If I'm made in God's image then God needs to lay off the corn chips and onion dip. Get some exercise, God! - Tatarigami
[ Parent ]

APL? [nt] (none / 0) (#48)
by James A C Joyce on Sat Mar 27, 2004 at 12:54:38 PM EST


I bought this account on eBay
[ Parent ]

replicate this (none / 2) (#18)
by Highlander on Fri Mar 26, 2004 at 04:44:45 AM EST

Can you post this somewhere else too so that it doesn't get lost or deleted when rusty decides the database is too big ? This is cool enough it should be replicated, maybe on wikipedia or E2. Or did I miss the "Eternal Hall Of Fame" that kuro5hin has somewhere :-)

Moderation in moderation is a good thing.
Yeah, and English is the same as C++! (1.77 / 9) (#19)
by ant0n on Fri Mar 26, 2004 at 06:28:12 AM EST

1. This is just plain silly. It's as if someone were to say: 'English is the same as C++! Both languages use the words if, exit and while!'.
Japanese has, of course, not more similarities with any programming language, than any other human language also has. And these similarities are very few. Programming languages have a syntax and a grammar, yes, and they are 'languages' in the sense that humans can express something with them. But comparing the grammar of a human language with the grammar of a computer language, at least in the sense you do it, is naive.
If your article were meant as a joke, I'd propably only critisize that it is a bit too long for a joke. But I fear that you are dead serious.

2. BNF is by far not the 'heaviest of nerdistic heavy artillery', it's just a very simple (and boring) way of describing the grammar of a programming language. BNF is the stuff they teach you in a very first course on computer science.

Goodness (2.40 / 5) (#30)
by intransigent on Fri Mar 26, 2004 at 01:06:08 PM EST

Give it a rest man. The article generates interest and gives a method for learning a language foreign to most English readers. Isn't that enough?

And your wrong about 2...(especially with regard to extended forms.) It is heavy and nerdy in the grammatical sense. It's notation is intentionally concise so as to leave no ambiguity, not to make it simple. Instead, it requires considerable comprehension of what it is and is not saying.



[ Parent ]
Kneejerk reaction (none / 2) (#49)
by bodrius on Sat Mar 27, 2004 at 01:18:25 PM EST

I'm not entirely convinced you can go through a deep learning of Japanese (i.e.: enough to actually communicate) with this method, but I'm willing to wait and see.

Your reaction seems rather superficial, on the basis that "human-language != prog language".

I find it interesting because all the normal tools we use to understand PLs are based on Linguistics, not on Computer Science.

We just stole the tools others invented to study Natural Languages because their very insufficiencies in that regard made them very apt for Programming Languages.

Now, you make a very superficial comparison between C++ and English which is the basis of your argument. The problem is that English in particular is a very poor fit for a formal language.

English has too many irregularities, even in comparison with other Natural Languages. You have too few rules, and you break them too often, even if just as official "exceptions", introducing non-determinism. This is a consequence of the development of the language, particularly as a written language (literacy is a necessity for the stability of the language).

"Modern English" is both:

I- Very young (16th-17th century), lacking the weight of centuries of strict tradition, like Chinese or Japanese. Even when it became more than a vernacular tongue, for a long time Latin and French were the formal languages used in text.

II- Non-formalized, never having an official government body defining its structure, like French or Spanish for example, or an unofficial cultural fetish for language propriety. This is almost certainly due to I.

Whether "classical" Japanese is easier to reason about in a Generative Grammar approach, I don't know yet. But it certainly lacks some of the above features, which reduces its irregularity.

I could certainly see how languages that have been solidified by study (perhaps to the point of petrification), like Latin or Esperanto, would be easier to transform into a PL.
Freedom is the freedom to say 2+2=4, everything else follows...
[ Parent ]

this series is (2.25 / 4) (#22)
by circletimessquare on Fri Mar 26, 2004 at 09:55:53 AM EST

otaku-rific!

The tigers of wrath are wiser than the horses of instruction.

uhm.. (1.75 / 4) (#25)
by AnalogBoy on Fri Mar 26, 2004 at 12:00:44 PM EST

Bah weep gra na weep ninny-bong.

--
Save the environment, plant a Bush back in Texas.
Religous Tolerance (And click a banner while you're there)
Optimus would be proud (none / 0) (#79)
by BWalint on Wed Mar 31, 2004 at 05:36:28 AM EST

Am I the only one who got that this is the "Universal Greeting"? :)

--BWalint

[ Parent ]

no [nt] (none / 0) (#80)
by lordpixel on Wed Mar 31, 2004 at 12:06:16 PM EST



I am the cat who walks through walls, all places and all times are alike to me.
[ Parent ]
More interesting than the last one (2.80 / 5) (#26)
by poyoyo on Fri Mar 26, 2004 at 12:32:24 PM EST

But you need to stop pretending that this description accurately describes Japanese grammar --- I'm not sure to what extent you're serious with this, but languages are much more complex and nuanced than you make it sound. Natural languages are not context-free. When you only know the introductory textbook subset of Japanese grammar, I suppose it might look this simple, but real-life Japanese is full of irregularities and exceptions.

It is not true that "arguments" always appear before the "operator", as you claim so strongly. In fact it happens often, in conversation or as a trick of literary style, that they'll come after, and this is perfectly understandable to a Japanese speaker. Your blanket statements oversimplify the reality, and you should at least acknowledge this.

That said, you are right on target with your "pre-eminent rule of Japanese grammar". I remember that back when I was studying my beginner's textbook and this rule was introduced around lesson 20, it hit me like a bombshell: suddenly everything fell together. However, I'm not sure how pertinent it is to explain it right away to someone with no previous background in Japanese; its full power only becomes evident when you are already familiar with all the different types of "predicates". Since the predicates superficially have wildly different forms (some end with "-i", some with "-ru", and even "-na" and "-no" since, although you call "no" a "noun combiner", these two particles can also be viewed as a variant of the copula "desu"), it may only lead to confusion. However, I agree that this is a point probably not emphasized enough in traditional Japanese curriculums.

(spoiler) Reminds me of Yoda (none / 1) (#27)
by TuringTest2002 on Fri Mar 26, 2004 at 12:52:02 PM EST

Bug-free program there is not.

Argh! (none / 0) (#78)
by trejkaz on Wed Mar 31, 2004 at 12:57:45 AM EST

Argh! You evil spoiler, I HADN'T SEEN THE MOVIE YET! Heh.

[ Parent ]
AOI INU (none / 1) (#28)
by piter on Fri Mar 26, 2004 at 12:53:02 PM EST

means blue dog. midori no inu is "green dog"
"That that is is not not that that is not is not." Jacques Derrida
aoi (none / 1) (#31)
by drivers on Fri Mar 26, 2004 at 03:57:22 PM EST

(adj) blue; pale; green; unripe; inexperienced

[ Parent ]
green dog blue dog? (none / 1) (#36)
by JyZude on Fri Mar 26, 2004 at 05:35:13 PM EST

Okay, so 'aoi' means green AND blue? So if you say 'aoi inu', what are you saying?

Is there a word that means green and not blue? Or blue and not green? Or is 'aoi' green more often than blue???

-----
k5 is not the new Adequacy k thnx bye


[ Parent ]
Concerning green/blue... (none / 2) (#37)
by Yosho on Fri Mar 26, 2004 at 06:51:59 PM EST

Aoi is just a green/blue.  It's more often meant to be blue than green, but can go either way.

If you want to say something is specifically green, you can use "midori"; it should be noted that midori is a noun, however, not an adjective, so it'd be "midori no inu".  You can use "buruu" to specifically say something is blue (although most people will know what you mean by "aoi"), but it's a na-adjective, so that'd be "buruu na inu".

[ Parent ]

green, blue ?! AH: reddo, gureen, orenji... (none / 2) (#60)
by japanologist on Sun Mar 28, 2004 at 05:12:43 AM EST

Hey everyone, まんあさま、みなさ今 日は! Green and Blue are quite some fun in Japanese. The reason for it is: look at the sea! The ocean sometimes is blue and it can be green. Look at old Japanese paintings: blue colors somewhat are green too. And that was a very close observation of nature in fact. Everything green has its parts of blue in it. The fun part about it is: if you want to sound hip, modern or worldly, you use Japlish: English word rendered Japanese. Like in some Universities in Japan you will find students forms that are in bright colours with a Katakana headline in really LARGE type saying almost stupidly: THE RED FORM THE GREEN FORM THE ORANGE FORM... As it is in Katakana though, the English will be rendered into a funny sounding: RETTO FORUMU レット・フォルム GUREEN FORUMU グリ-ン・フォルム ORENJI FORUMU オレンジ・フォル&# 12512; BURUU FORUMU ブル-・フォルム As if Japanese Students where not clever enough to read the right Kanji for these colours! :-) Japanese seem to be fascinated by "western" colours. Likewise, me as a graphic designer, I am fascinated by the rather different colour ranges used in Japanese design. If you happen to have Adobe Photoshop or Illustrator, just for fun go to the colour pallettes and activate the Toyo-colour system swatches - BATHE in these colours! You will love it!
凄いわねぇぇぇ!
[ Parent ]
My point was that ... (none / 0) (#57)
by wombat68 on Sat Mar 27, 2004 at 07:52:58 PM EST

"Aoi inu" has no marker for the adjective, so how do we get (no=aoi) or (na=aoi). Or am I missing something completely?

[ Parent ]
Reaction on "Japanese for Nerds" (2.12 / 8) (#29)
by japanologist on Fri Mar 26, 2004 at 01:05:48 PM EST

みなさん、今日は!  Hello everyone! It is so interesting how people really react on your brilliant observings of the Japanese language. Someone wrote you couldn't compare Japanese to a computer language as you can't compare English to a computer language. True. And wrong. You can't compare English to Japanese. Right: languages are more than a set of rules, and Japanese has its own really fun flavours of slangyness and spoken dialects. But for the written, formal way of the language, it sticks very much to extremely tight rules - so tight a comparison with a computer language (where this "thightness to the rules" is simply called "syntax") can perfectly be made. You cannot do this with English. "MIND" is a perfect example. It is a great programming language that can be read like perfect Japanese. However I know of no computer language (even if most - if not all - make use of English TERMS) reads out like Standard American Written English (SAWE), which could be compared to standard written Japanese in a way that it has a stricter syntax than the normal written or even spoken language. Again, I find it most interesting to see how much people seem to dislike your chain of thoughts. They are really true. Yes, some of you are right: there is more to a language then rules. Righto. There are things to can say (and maybe you can write) in Japanese, that won't fit into this description. However, if you do so, you drift off into slang, sociolect or dialect. And yes, Japanese has at least as many ways as any other language to say things between the lines. But somehow, this can be accomplished by means of remarks in programming languages too. This "between the lines" thing is typical to human nature and as such it has just as well found its way into programming. The other day I was going through some CSS definitions of a large web site when I found - between the lines - a comment that really amused me. This was a project where a former table-layout was transformed into a CSS layout for speed and accessibility reasons. The underlying content management system seemed to have outputed some element in form of some layout table. The programmer commented on this: // my workaround to bypass this nasty // tables generated by XXX Portal Server. See, noone teaches a programmer HOW to write a comment. They just do it. And this happens in the Japanese language too. However, the major part of it can be described just as in this great article series "Japanese for Nerds"!
凄いわねぇぇぇ!
???????????????? [nt] (none / 0) (#72)
by fuchikoma on Tue Mar 30, 2004 at 01:27:52 AM EST



[ Parent ]
I meant u,,,,,v,͐,,,,,,B (none / 0) (#76)
by fuchikoma on Tue Mar 30, 2004 at 07:31:47 PM EST

Opera savagely killed itself after that failed post.

[ Parent ]
Error in example? (none / 3) (#32)
by lordpixel on Fri Mar 26, 2004 at 04:02:55 PM EST

I can't speak Japanese, but I think I can read BNF, so, is there an error in this example?

"After adding the final I, this rule generates words like NAKU NA-I (didn't not exist), SUGOKU NA-I (wasn't amazing), HIDOKU NA-I (wasn't horrible)."

I'm missing why this is past tense. HIDOKU NAI should surely be 'isn't horrible'. 'Wasn't horrible' would be 'HIDOKU NAKATTA' ?

Following the grammar:

<adjective> ::= <adjective-present> | <adjective-past>

<adjective-past> ::= <adjective-base> KATTA

We want past tense, so we have: <adjective-base> KATTA>

<adjective-base> ::= na- | sugo- | hido- | <adjective-negative>

We want a negative, so we have: <adjective-negative> KATTA

<adjective-negative> ::= <adjective-base> KU NA

Giving: <adjective-base> KU NA KATTA

and finally we choose HIDO for <adjective-base> giving:

HIDOKU NAKATTA - wasn't horrible

As far as I can see, either the article has a typo and HIDOKU NAI means 'isn't horrible' or the author needs to go back to the drawing board with his BNF Grammar.

Any way you look at it, this is neat to play with :)

I am the cat who walks through walls, all places and all times are alike to me.

You're correct. [nt] (none / 1) (#35)
by braeburn on Fri Mar 26, 2004 at 05:27:43 PM EST



[ Parent ]
CORRECT!!! (none / 0) (#59)
by japanologist on Sun Mar 28, 2004 at 04:58:36 AM EST

Hey, this just proofs it! The concept's working! Right out: "na-i" in past tense becomes "na-katta".
凄いわねぇぇぇ!
[ Parent ]
rebol dialecting (none / 1) (#43)
by pantagruel on Sat Mar 27, 2004 at 03:01:38 AM EST

base languages could perhaps be implemented as DSLs; thinking specifically of Rebol dialects:


quick description of dialecting
some sample dialects
the alien dialect

As Rebol's parse is bnf based this might be a good example to use for building a human language dialect .



nver mind (none / 0) (#50)
by pantagruel on Sat Mar 27, 2004 at 02:35:09 PM EST

I didn't pick up right away that this was an actual language. "Mind", that's interesting, a quick google shows that it has some prestige - being taught at Amherst?

[ Parent ]
nope not amherst but.. (none / 0) (#51)
by pantagruel on Sat Mar 27, 2004 at 02:44:05 PM EST

found notes: http://www.ipsj.or.jp/members/SIGNotes/Eng/22/1988/016/article004.html http://www.scripts-lab.co.jp/mindclub/

[ Parent ]
Japanese syntax (3.00 / 15) (#47)
by harkonen on Sat Mar 27, 2004 at 12:43:25 PM EST

you might want to consider checking out 'A Dictionary of Basic Japanese Grammar' by Seiichi Makino and Michio Tatsui published by The Japan Times for reference on your nihongo programming project

Hello Last User! (none / 0) (#86)
by Chorian on Sun May 23, 2004 at 12:47:54 AM EST

Is someone going to reply to this?

[ Parent ]
you beat me to it (none / 0) (#87)
by Mindcrym on Tue Jun 22, 2004 at 05:49:23 PM EST

Is someone going to reply to this?

That remains to be seen, doesn't it?

  -Mindcrym

[ Parent ]

Useful (none / 3) (#52)
by Julian Morrison on Sat Mar 27, 2004 at 03:14:08 PM EST

Maybe this method might not capture the true flexibility of the language. (It can't -- all languages upon humans are based who the grammar may play hob with for reasons various). But still, it could easily bootstrap the learner to a sufficient understanding to be able to self-teach the subtleties.

Saiyaku ! (1.33 / 6) (#53)
by Cardenio on Sat Mar 27, 2004 at 03:38:47 PM EST

Just stop with this please ! LOL. Everything about this is wrong. This not Japanese. Where is this guy getting this ? " Barrons : Japanese - Master the Basics " or something else even worse ? Look the idea is fun, but this not Japanese. Since this is all ' let's pretend ' , why don't you make up a language ! Or take an already made up language ( I'd suggest ' Vulcan ' The Vulcan language would be ' like a computer language ' wouldn't it ) and make that into ' the nerd language '

A bug in the bug example? (none / 1) (#55)
by BlckKnght on Sat Mar 27, 2004 at 05:11:46 PM EST

I may be misunderstanding this, but shouldn't the translation of "I add the bug [to the list of bugs]" use GA instead of WA: BOKU GA BAGU WO TASU instead of BOKU WA BAGU WO TATSU?

Also, I'm suprised nobody has mentioned Project LRNJ, which teaches recognition of Japanese characters (katakana, hiragana and 1000 basic kanji) in the context of a computer role-playing game. The prototype game, Slime Forest Adventure, is free to download.

-- 
Error: .signature: No such file or directory


Learning Japanese (none / 0) (#61)
by ant0n on Sun Mar 28, 2004 at 06:32:33 AM EST

I just played Project LRNJ. It's an interesting idea, but the graphics suck.
For learning kana, I strongly recommend the program Learning Japanese instead!


-- Does the shortest thing the tallest pyramid's support supports support anything green?
Patrick H. Winston, Artificial Intelligence
[ Parent ]
I forgot to say... (none / 0) (#65)
by ant0n on Sun Mar 28, 2004 at 12:25:07 PM EST

...that Learning Japanese has anime girls that strip when you know the correct kana.

-- Does the shortest thing the tallest pyramid's support supports support anything green?
Patrick H. Winston, Artificial Intelligence
[ Parent ]
no (none / 0) (#71)
by VasyaPoup on Tue Mar 30, 2004 at 12:53:10 AM EST

WA and GA are both for subject.

GA put more stress on the subject, though.

[ Parent ]

I'm studying Chinese (none / 1) (#56)
by zephc on Sat Mar 27, 2004 at 05:14:57 PM EST

I'm studying Chinese (at the intro level) and would love to see a BNF for (Mandarin) Chinese.

Excellent (none / 1) (#64)
by tetsuwan on Sun Mar 28, 2004 at 11:02:23 AM EST

I will use this. Of course it overly simplifies everything, but that's the point of all introductory grammars. First pidgin grammar to have something to stand on, then tackle the advanced later on.

Njal's Saga: Just like Romeo & Juliet without the romance

Description of "NAI"... (none / 0) (#69)
by marcmengel on Mon Mar 29, 2004 at 10:49:47 AM EST

It seems to me the way you describe "nai" and the way you translate it don't quite match up.

I think from they way you translate it that
  nai(wa=x,ga=y:default "the universe")
means
  y does not have x
which when y is defaulted, means "the universe does not have x", or it doesn't exist.

But of course, I'm generalizing from a very few, very simple examples you have shown...

Why the complaints? (none / 0) (#70)
by mveloso on Mon Mar 29, 2004 at 03:41:02 PM EST

It's so funny reading the comments about this set of articles. The fluent are horrified at the brutal simplification of the language, whereas the illiterate are happy to be able to understand even a little bit.

If you are fluent, realize that anyone speaking in the manner described in this article will immediately be branded a foreigner, and the listeners' will adjust accordingly. It's baby talk - it gets you understood, but there's a lot that you can't say. The goal isn't to hold high-level negotiations about weighty subjects. The goal is to be amusing and somewhat interesting in a social situation.

Because ~ (none / 0) (#82)
by Cardenio on Thu Apr 01, 2004 at 12:21:41 AM EST

it's not ' oversimplfied ' Japanese - it's COMPLETELY WRONG. It's just made up ' rules of grammer ' , real Japanese grammer this guy has no info about at all.

[ Parent ]
How do you post in Japanese? (none / 0) (#77)
by fuchikoma on Tue Mar 30, 2004 at 07:37:03 PM EST

Every time I try to post in Japanese on K5, it comes out as a row of question marks or random gomibake... what's the secret? O_o;

Not sure (none / 0) (#81)
by lordpixel on Wed Mar 31, 2004 at 12:13:13 PM EST

According to my browser, it considers Kuro5hin's pages to be ISO 8859-1 (ie, Western Latin 1) so its non-obvious to me how one would encode Japanese.

If I override the encoding, making it Shift_JIS then the second of your two post topics below comes through correctly, but the first is still just question marks: ?????????.

There's clearly some text encoding trick that works, but I'm not sure what it is, given K5 seems to be serving ISO 8859-1 pages. hrm...

I am the cat who walks through walls, all places and all times are alike to me.
[ Parent ]

use character entities (none / 1) (#83)
by Ubiq on Fri Apr 02, 2004 at 05:12:59 PM EST

Like `&#40165;' for 鳥. By the way, when I entered the kanji directly using firefox, kuro5hin did the translation for me. Browser issue?

[ Parent ]
Recursive? (none / 0) (#84)
by bkhl on Mon Apr 05, 2004 at 12:56:34 PM EST

Um, all natural languages have recursive grammars. They wouldn't be very useful otherwise...

when the hell is number three (none / 1) (#85)
by pantagruel on Tue Apr 20, 2004 at 11:25:14 AM EST

I've been waiting patiently...

Japanese for Nerds (II) | 87 comments (78 topical, 9 editorial, 2 hidden)
Display: Sort:

kuro5hin.org

[XML]
All trademarks and copyrights on this page are owned by their respective companies. The Rest 2000 - Present Kuro5hin.org Inc.
See our legalese page for copyright policies. Please also read our Privacy Policy.
Kuro5hin.org is powered by Free Software, including Apache, Perl, and Linux, The Scoop Engine that runs this site is freely available, under the terms of the GPL.
Need some help? Email help@kuro5hin.org.
My heart's the long stairs.

Powered by Scoop create account | help/FAQ | mission | links | search | IRC | YOU choose the stories!