I recall I have read about a parser which you just have to feed some sample lines, for it to know how to parse some text.
It just determines the difference between two lines to know what the variable parts are. I thought it was written in python, but i'm not sure. Does anyone know what library that was?
-
While extremely vague, this question is, nevertheless, quite interesting. I am also curious as to whether there are such "self-learning" parsers (especially if they are written in python).shylent– shylent2009年05月28日 16:24:32 +00:00Commented May 28, 2009 at 16:24
-
I know it's vague, but I haven't got a clue what to tell more about it.Ikke– Ikke2009年05月28日 16:30:44 +00:00Commented May 28, 2009 at 16:30
-
@shylent There doesn't seem to be publicly available code for this problem, but some research has been done: See "An Efficient Learning of Context-Free Grammars" by Sakakibara, PDF at tinyurl.com/nrpmor.Nathan Kitchen– Nathan Kitchen2009年05月28日 22:56:16 +00:00Commented May 28, 2009 at 22:56
-
Thanks for asking this question. I have learned a lot from the responses.PyNEwbie– PyNEwbie2009年05月29日 01:59:31 +00:00Commented May 29, 2009 at 1:59
2 Answers 2
Probably you mean TemplateMaker , I haven't tried it yet, but it builds on well-researched longest-common-substring algorithms and thus should work reasonably... If you are interested in different (more complex) approaches, you can easily find a lot of material on Google Scholar using the query "wrapper induction" or "template induction".