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:
- I didn't have any money
- I add the bug [to the list of bugs]
- 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:
- 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.
- 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:
- the highly regular system of Japanese verbs
- particles that go on the end of sentences to show questioning or emphasis
- quoting, the way to talk about what people are saying or thinking
- how to use English words in Japanese
- using NO, the all-purpose noun combiner
and, in general, pull everything together.