Live data from Hacker News

Typed Japanese

github.com

31–40 of 40 posts

Re: Typed Japanese

#31
post #7

Can this be used to build a grammar checker for japanese language?

Japanese grammar is so simple because it doesn't matter that much.

Most of the "rules" are common patterns made into guidelines, and they'll change depending on the speaker, context, society of the time (the "correct" way is fully dictated by the majority). And you could break the grammar rules as long as the other accepted guidelines are OK.

As a parallel you can learn to mechanically drive a car, but driving it "correctly" will require full knowledge of traffic code, societal rules and how to reasonably handle conflicting situations, including crashing it into a tree if it means avoiding a packed school bus.

Re: Typed Japanese

#33

This reminds me of categorial grammars. Has anyone here ever looked into them? I loved them. They're like simply typed lambda calculi but instead of a single arrow type there are two, one for the left and right side of a symbol. So you can so like: and : Phrase \ Conjunction / Phrase do : Subject \ Verb / Object Sorry if I have the directionality wrong but `and` would take a phrase on the left, another on the right a…

An interesting property is that when you have left and right application, which part of fx is the function and which is the argument becomes sort of ambiguous. You can think of f as something that combines with a B on its right to produce an A, (A/B)B = A. But you can also think of x as something that combines with an A/B on its left to produce an A, (A/B)((A/B)\A) = A.

This is famously used in interpreting the status of "Socrates is mortal" ("Socrates" is the argument) and "Every man is mortal" ("is mortal" is the argument).

Re: Typed Japanese

#34
The thing I like about classical symbolic/analytic AI (such as grammars and semantic models) is that it was comprehensible (or "explainable.")

Unfortunately it didn't scale as well as opaque DNNs trained on huge amounts of data.

Re: Typed Japanese

#35

Earlier quoted context omitted.

Every human language works this way...? This is why we have systems called "grammars" in the first place: they capture regularity in the structure of a language. Human languages are, in a sense, "infinitary", so that they aren't simply a set of fixed phrases. However there are, depenging on the language, also patterns they don't allow. (And some patterns _any_ human languages don't allow.) This logically necessities…

While you're right, I think parent/OP's discussion is on how composable a language is with low semantic knowledge of the components, just going with the grammatical rules. For instance in English you'll need to know if a subject is a third person singular or not to adjust the verb. Or even just singular vs plural for the adjectives and pronouns. And you'll need the gender in gendered languages (French, Italian etc) I…

> For instance in English you'll need to know if a subject is a third person singular or not to adjust the verb.

There is a suprising amount of subtlety here. What you need to known is if the subject is syntactically singular or not. Once you have that, it does not matter is the subject is actually singular. For instance, if you are talking to a single person, you say still say "you are" instead of "you is", because "you" is syntactically plural, regardless of its actual meaning.

This is very useful for generating grammatically correct sentences (or testing the grammar of existing sentences). The set of features that cause this type of inter-word agreement are called phi features (typically count, gender, person, and case). Since phi features are purely syntactic, you tag words with them just like you tag words with their part of speach.

In real speach, this can get weird, as it is possible for the same realized word to have different phi features depending on its sementic meaning. However, if all you care about is determining if a sentence is gramatical, you do not care if it means what was intended.

As an aside regarding Japanese, there have been some attempts to model Japanese politeness markers as a form of agreement; however, I have never found those arguements to be convincing.

Re: Typed Japanese

#36
post #4

Earlier quoted context omitted.

I'm not sure what you mean by strict. If by "regular and consistent" then, yes. There are a handful of irregular verbs. Everything else is completely regular with suffixes attached to the verb root. Japanese is not unusual (on this particular point). That is probably the most common structure for a language. Swahili verbs are entirely regular and can have a long sequence of prefixes which follow a strict order. kula…

> That is probably the most common structure for a language. Swahili verbs are entirely regular and can have a long sequence of prefixes which follow a strict order. This seems a little confused. If a language's verbs are entirely regular, the normal point of view would be that that language doesn't inflect verbs at all. For example, an English verb can include up to four prefixes, which occur in an order that never…

Also the modal verbs (must, can, may, shall etc.) are irregular in the present third-person singular, because they do not add "-s".

Re: Typed Japanese

#37

Earlier quoted context omitted.

> That is probably the most common structure for a language. Swahili verbs are entirely regular and can have a long sequence of prefixes which follow a strict order. This seems a little confused. If a language's verbs are entirely regular, the normal point of view would be that that language doesn't inflect verbs at all. For example, an English verb can include up to four prefixes, which occur in an order that never…

Also the modal verbs (must, can, may, shall etc.) are irregular in the present third-person singular, because they do not add "-s".

They also have no participles and no infinitive form. They are radically different, grammatically, from other English verbs. I did mention that they "inflect only for the past tense".

It's hard to call them irregular as to the third-person present singular; there is a rule there and all of them follow it. They're just different from non-modal verbs.

You could fairly call shall and will irregular in their negative forms shan't and won't.

The passive marker get is irregular in failing to be an auxiliary verb, unlike all modals, both aspect markers, and the passive marker be.

Re: Typed Japanese

#38

Earlier quoted context omitted.

While you're right, I think parent/OP's discussion is on how composable a language is with low semantic knowledge of the components, just going with the grammatical rules. For instance in English you'll need to know if a subject is a third person singular or not to adjust the verb. Or even just singular vs plural for the adjectives and pronouns. And you'll need the gender in gendered languages (French, Italian etc) I…

> For instance in English you'll need to know if a subject is a third person singular or not to adjust the verb. There is a suprising amount of subtlety here. What you need to known is if the subject is syntactically singular or not. Once you have that, it does not matter is the subject is actually singular. For instance, if you are talking to a single person, you say still say "you are" instead of "you is", because…

> What you need to known is if the subject is syntactically singular or not.

It's a bit broader IMHO. For instance, plurals are handled as singular based on the semantics, even in written language. I liked how different authors handled the Olympics in wikipedia for instance

> The Summer Olympic Games, also known as the Summer Olympics or the Games of the Olympiad, is a major international multi-sport event

vs

> The modern Olympic Games (Olympics; French: Jeux olympiques)[a][1] are the world's leading international sporting events.

Same way a singular nouns will be handled as plurar if the speaker recognizes them as such ("The UN are planning a meeting")

There will be arguments on whether these sentences are grammatically correct, but I'd be more for the descriptive approach than the prescriptive one, as at the end of the day usage wins.

> attempts to model Japanese politeness markers

I kinda feel for them as it's the most evolving part of the language IMO. As people get used to a level of politeness, it loses it's status and a stronger form becomes needed. Basically there's a politeness inflation happening through the years, and it's all based on how people perceive it, so logic is also not an element of it.

Re: Typed Japanese

#39

Earlier quoted context omitted.

English is mixed head-initial and head-final, for example objects go after verbs (head-initial) but adjectives go before nouns (head-final). Japanese is strictly head-final.

> for example objects go after verbs (head-initial) There would be a better argument that this was an example of left-headedness if subjects also went after verbs.

That’s part of why English is mixed.
Post reply on HN