Hacker News new | ask | show | jobs
by PaulHoule 3692 days ago
Meh.

This kind of parser isn't all that useful anyway. Parts of speech are one of those things people use to talk about language with, but you don't actually use them to understand language.

1 comments

You do subconciously. When you read "Dave punched John" you don't need to think "hmmm, is 'John' the object or the subject?" but if your brain hasn't figured out which is the object and which the subject you won't know who is hitting who.

You don't need to be able to name or define parts of speech but you need to be able to parse them, or you won't understand anything.

Yeah, except are you sure that the way you parse a sentence maps 1:1 to what you learned as "parts of speech"? I think an equivalent understanding, one that seems to be more intuitive to the way my own brain works (if I can believe introspection), is that "punched" is to be read by default as "--punched-->", and "was/is punched by" pattern-matches to <--punched--". Arrow denotes who's punching whom.
That's your brain taking a shortcut because you know that "punched" is a verb, and that a verb in that form is likely to be followed by a subject noun, etc. Even if you never study grammar and couldn't even answer the question "which is the verb in this sentence?" your brain has still learned to recognise the different types of word which is why you understand them.

Disclaimer: I'm not a linguist, but by layman's standards I'm pretty confident.

Best grammar is the one that best matches actual language use. What you describe is similar to how link grammars (try to) work: https://en.m.wikipedia.org/wiki/Link_grammar