1

I. Are any simple algorithms which attempt to "learn" the grammar of a language?

Example: I feed into the program a few thousand books worth of English, and want a program which could analyse the text and group together words which have a similar function. Ie it could group words into distinct groups based on similar usage - ie it could figure out how to group words that are used similarly (e.g. into verbs and nouns, etc). Are there any good resources which deal with this?

II. Are there any other good ways of "training" a program with lots of example sentences and then trying to generate new sentences which fit the grammar? (Apart from Markov chains.) If grammar induction isn't too difficult, then you could potentially use that to generate new sentences.

Sorry if my question isn't clear, I haven't too much experience in machine learning/linguistics but do any of you have any resources or places to point me?

1
  • This is too broad. I tried to start answer your question but it was too complex and long. Correct me if I'm wrong, you're asking if we can build any programs to make grammatical sentences? Mar 27, 2016 at 3:38

2 Answers 2

1

I believe you seek a syntactic language model (as opposed to a basic lexical (n-gram) language model).

For that you need text data that has been annotated with the syntactic trees, or a parser (which was trained on such text data, and will give some good - but imperfect - annotations on your data).

You could then generate random (lexically improbable and semantically nonsensical) grammatical text from that.

Note though that lexical and even character-level models with no concept of grammar work well enough for many purposes, especially for a language like English without much agreement and even less long-distance agreement.

You could read more about parsing at https://spacy.io/blog/how-spacy-works. Note that good parsers like spaCy do infer the function of a made-up word from context, for example:

enter image description here

0

Wikipedia has some discussion of learnability along with relevant references: Language identification in the limit. And here is an interesting paper by Geoff Pullum: Learnability.

Not the answer you're looking for? Browse other questions tagged or ask your own question.