Live data from Hacker News

Japanese explained to programmers

lajili.com

131–140 of 416 posts

Re: Japanese explained to programmers

#131
post #116

I have to fundamentally disagree with the premise: Japanese is probably one of the least logical languages on the planet. To wit, it combines the written complexity of Chinese with the spelling inconsistency of English. The one-to-many relationship between a given kanji and its many pronunciations makes it maddeningly difficult, even for native speakers. 生, for example, has at least nine pronunciations. The only way…

You are now talking about the written Japanese language, with all the (real) problems with Kanji, an imported writing system. True enough, but that has little to do with the Japanese language . If you look at verbs, and ignore the rubbish written in most textbooks about "conjugations" (which for the most part aren't conjugations), you'll find one of the most logical and consistent systems on the planet. There are onl…

But what is a language without its written form?

I mean, fine, if we are going to contrive a comparison where we are only comparing spoken forms, well…English is still going to come out on top, because - exactly as you explained in your edit - its grammar is simple enough that almost anyone can have a go at it. Stick some words together and you’re probably 80% of the way there. That’s not going to be true of any inflected language, even if - as inflected languages go - Japanese is one of the simplest.

Anyway, if we are going purely on grammar and ignoring written forms, Chinese - having almost no grammar at all [citation needed] - is surely the apex of simplicity.

Re: Japanese explained to programmers

#133

I have to fundamentally disagree with the premise: Japanese is probably one of the least logical languages on the planet. To wit, it combines the written complexity of Chinese with the spelling inconsistency of English. The one-to-many relationship between a given kanji and its many pronunciations makes it maddeningly difficult, even for native speakers. 生, for example, has at least nine pronunciations. The only way…

I think the language is so difficult that it actually holds the society back. Things are just way harder than they need to be in a lot of instances.

It didn't hold back their society, what was held back was the competition because Japanese is hard and the locals have all the business and flourished. That's my view on why they were successful compared to other Asian nations who adapted English early on their history.

Re: Japanese explained to programmers

#134
post #83
post #79

Earlier quoted context omitted.

ChatGPT's response is full of BS. 青い魚 is あおいさかな NOT あおいう お The middle character has nothing to do with the verb to be; it's an adjective suffix. 青い魚 is literally "blue fish". It's not a full sentence.

I appreciate your call out, I would've had no idea. Is the main idea still correct? I'm curious what technique Japanese speakers use to avoid collisions like the one referenced in the article.

Chinese characters/Kanji are typically monospaced and characters are written within a box.

Re: Japanese explained to programmers

#135
It's no different from english or probably most other languages if you think every character is a primitive. Example: word.new("T", "E", "A") would be equivalent to word.new("牛"). Then word.new(word.new("T", "E", "A"), word.new("S", "P", "O", "O", "N")) would be equivalent to word.new(word.new("牛"), word.new("肉")).

Next concept the author mixed is working with the verbs, verb.new(word.new("E", "A", "T")).PastTense() would give you "ate" Just like verb.new(word.new("食", "べ", "る")).Polite().Past() would output "食べました"

Then working with sentences, ex: Topic.new("me").toString() would be just "meは"... Put it all together and output everything subject > object > verb, instead of the more familiar subject > verb > object.

The author mixed a lot of those grammar concepts, with the words etymology... and it got confusing.

"2 kanjis becoming 1" is just the radical. 涙 (tear) 汗 (sweat) 泳ぐ (swim) 沈む (sink) 溺れる (drown), they all share the same radical (氵/sanzui/mizu/water). While it's not a rule, they are likely to have some relation to it. Just like in english waterfall, waterproof, waterspout, watermelon, etc.

I like the fact that the author is fascinated by the Japanese language and wants to share his discoveries. I guess everybody learning a seemingly completely new (unrelated to anything you know), experiences a similar phase. In his case he found similarities with a programming language. And I guess we all do that, we connect the things we're learning to the things we already know.

Someone learning english would probably be equally amazed by the watermelon. I mean... It's not so surprising if watermelon in your native language is, let's say: Melancia (portuguese). It takes half of the discovery surprise from you, as you already could suppose it's melon related.

I can't deny, "Fire + Mountain = Vulcan" was awesome to me as well. Learning that "Vulcan = god of fire in ancient roman mythology" does not hit me the same way, I already expect it to be greek/roman/latin.

Re: Japanese explained to programmers

#136

Very interesting. How does regex/pattern matching work with Kanji? Or does it?

It works okay. You can setup unicode blocks and use them.

I have a collection of python scripts you can use for text manipulation:

- regex:https://github.com/olsgaard/Japanese_nlp_scripts/blob/master...

- translitteration tables: https://github.com/olsgaard/Japanese_nlp_scripts/blob/master...

https://github.com/olsgaard/Japanese_nlp_scripts

Re: Japanese explained to programmers

#137

Earlier quoted context omitted.

It depends on your goals. If the goal is speaking and understanding it being spoken, it's one of the most orderly and consistent languages there is, with (non-typically for languages) clear and simple rules, grammar and modifiers. Reading is similar until Kanji comes along and messes things up, but by that stage you could probably get by pretty well, both in the country, and by ingesting materials with simplified Hir…

> Reading is similar until Kanji comes along I mean, sure, if you exclude the most complicated writing system currently in use in any natural language, Japanese is simple. I hear Chinese is really easy too if you just do everything in pinyin. Right, sarcasm off. Yes, the grammar is pretty simple. It has a mere three irregular verbs. The inflection can be somewhat unwieldy (温かくなかったら atatakakunakattara, if it were not…

[deleted]

Re: Japanese explained to programmers

#138
post #50

I have to fundamentally disagree with the premise: Japanese is probably one of the least logical languages on the planet. To wit, it combines the written complexity of Chinese with the spelling inconsistency of English. The one-to-many relationship between a given kanji and its many pronunciations makes it maddeningly difficult, even for native speakers. 生, for example, has at least nine pronunciations. The only way…

It's not clear to me whether it's one of the _least_ complex languages (there are various warts I'd get rid of if I were in control), but it's certainly not more complex than English. The "many pronunciations for one kanji" thing isn't a problem in practice, because 1) most kanji have _1_ on'yomi (Chinese) and _1_ kun'yomi (native) pronunciation, with it being obvious which one to choose from context, especially beca…

I think parent’s use of ”logical” instead of “complex” better fits the bill.

For instance, on the 1 onyomi with 1 kunyomi average, there’s no specific logic making it that way (I actually doubt it’s only one of each in average), and there’s no limit on how many readings a kanji can get, people can randomly add new readings and popularize them.

It’s not a problem in practice because not knowing most words’ reading has little impact in day to day life, and mixing up kanjis is pretty common and people won’t make a fuss about it.

All in all I think Japanese has a very steady learning curve where other languages will have sudden walls to climb, but it’s not more or less complex, difficulty is just more evenly distributed.

Re: Japanese explained to programmers

#139

TIL Japanese kanjis are like German words, composed to make a new meaning. Quite insightful. Is this also the case for chinese usage of Kanji? I vaguely remember that Japanese language differs from Chinese language because of using sybils or something?

[deleted]

Re: Japanese explained to programmers

#140

Earlier quoted context omitted.

Question: What are your mother tongue(s)? Similarly to people thinking less of the country they were born/raised, I tend to find that people always think their first language(s) are the less logical ones, maybe that fits in here as well. Some sort of bias it seems.

My mother tongue is English. I studied Japanese to degree level so I feel at least moderately qualified to comment on it. English is grammatically fairly simple, having dispensed with much of the (redundant) complexity found in its European brethren (gender, case, almost all inflection). I would argue that that makes it fairly easy for beginners to develop a basic command of it. Its main problems are its unpredictabl…

I learned both English and Japanese as third/fourth languages and English grammar does _not_ make sense compared to Asian languages that has comparatively very logical forms, usually with minimal modifiers that doesn't change the entire sentence structure.

I frankly gave up with English grammar and just did whatever feels right.

Post reply on HN