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?