News for hackers. Stuff that matters.
Re:Inference of Regular Expressions for Text Extraction from... by bcherny on Monday May 23, 2016 @07:27PM (#11757809)
This is very cool, and is a very hard problem!

It reminds me of Hofstadter's Jumbo experiment from the '80s: https://books.google.com/books?id=somvbmHCaOEC&pg=PA97&lpg=P... (Clojure implementation here: https://github.com/vemv/jumbo). If I remember right, his thesis was that this sort of pattern matching is at the core of what is intelligence, and maybe even what is consciousness.

For example if I have "ABBC" and "BCCD", what is the rule? Is it any 4 letter string? Is it the same character repeated twice? Is it the same character repeated twice in a particular offset from the beginning of the string? There is some aspect of heuristics, and some aspect of "elegance" to a given solution - what a human would judge to be the "right" solution is surely some balance of specificity and simplicity.

Also see relevant Stack Overflow posts: http://stackoverflow.com/questions/4880402/how-to-auto-gener... and http://cstheory.stackexchange.com/questions/1854/is-finding-...

Re:Inference of Regular Expressions for Text Extraction from... by tyingq on Tuesday May 24, 2016 @07:49AM (#11760735)
Different approach, but I find this pretty handy for coming up with ideas for parsing via regex: https://txt2re.com/
Re:Inference of Regular Expressions for Text Extraction from... by maraschino on Tuesday May 24, 2016 @09:15AM (#11761248)
Re:Inference of Regular Expressions for Text Extraction from... by brudgers on Monday May 23, 2016 @11:08AM (#11754332)