News for hackers. Stuff that matters.

mimmuz

Re:Generate Regex from Examples on Monday July 27, 2015 @12:38PM (#9956261)
1. what do you mean with "smallest" (number of state, number of characters, ...)?

2. to evaluate the solution quality on the training data is wrong. In order to mitigate the overfitting risk, the Regex Generator learns the regular expressions from half of the training examples and validates them on the other half of the examples. We also assessed our algorithm on 20 extraction tasks and evaluated the final solutions on unknown corpora (testing): the quality of final solutions is comparable to expert human solutions.

"Sophisticated" regex users don't need our tool: regex generator is intended for novice users or to demonstrate that we can automatically find solutions which are comparable with human ones.

Please note that defining an extraction task is always error prone, there may be errors in the task definition (understanding) or during the regex coding; smart and expert programmers make errors too, there may be corner cases they have not thought about. Sometimes, you need to get the job done--with a fair confidence--and improve it later. This is our view of the real world.

Most important thing: your criticisms are valid for all the problems of supervised machine learning. Do you really think taht driverless car, antispam filters, automatic transaltors and so on are useless only because they are trying to infer a model from partial data? I do not think so.

Re:Generate Regex from Examples on Sunday July 26, 2015 @01:59PM (#9951720)
I think I understood your point but I suppose you misunderstood our intent. Daily extraction tasks are commonly solvable with a regular expression, this tool is intended for people handling a task where a regular expression suffices in order to solve it. An extraction task may be solved with a regular expression or may not, in the second case the regex generator is not the right tool for the job.

The provided examples often cover a subset of the target language; there are infinite regular languages that fit the task---described by provided examples---and infinite number of regular expressions generating it. Regex generator searches for a regular expression taking into account other constraints---i.e: it prefers small regular expressions. In this way we use the regular expression length as heuristic that pushes towards more generic regular expressions and more human-readable-understandable solutions.

We know that we cannot infer a regular language from an incomplete subset of it; regex generator is intended as a practical tool that solves a real-world problem.

Anyhow, the literature is full of papers about inferring an automata from examples: http://link.springer.com/chapter/10.1007/BFb0054059 http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1299597 http://www.sciencedirect.com/science/article/pii/S0031320305... http://ieeexplore.ieee.org/xpls/abs_all.jsp?arnumber=1432740

Re:Generate Regex from Examples on Sunday July 26, 2015 @09:48AM (#9951029)
Moreover an equally restrictive regex could be:

[a-d]

I start to think that we are talking about different topics ;-)

Re:Generate Regex from Examples on Sunday July 26, 2015 @09:44AM (#9951022)
I do not understand the point. Really. My limit... Or you misunderstood the purpose of the automatic regex generator.
Re:Generate Regex from Examples on Sunday July 26, 2015 @07:05AM (#9950729)
the system requires also negative examples
Re:Generate Regex from Examples on Saturday July 25, 2015 @02:19PM (#9948456)
LOL :P
Re:Generate Regex from Examples on Saturday July 25, 2015 @02:08PM (#9948412)
It is hosted on our machine in our lab. Maybe it's time to move elsewhere... ;)
Re:Generate Regex from Examples on Saturday July 25, 2015 @02:06PM (#9948408)
Some negative examples can help (it is designed to perform a text extraction)
Re:Generate Regex from Examples on Saturday July 25, 2015 @11:37AM (#9947857)
the system tries to generalize, so probably it choose something like \d+ (it is shorter)
Re:Generate Regex from Examples on Saturday July 25, 2015 @08:33AM (#9947409)
hi guys, thank you for your interest in our system of automatic generation of regex.

we are experiencing some trouble with connectivity due to the... unexpected popularity :)

we are working to solve this, but we are a very small research group with limited resources.

meanwhile, if you are interested in the details of our algorithm take a look at the source code hosted here: https://github.com/MaLeLabTs/RegexGenerator

great! ...but now you have 3 problems! :D
Re:Lego Scorpion - Mortal Kombat on Thursday December 13, 2012 @05:23AM (#4915165)
very nice! maybe with an additional skull head would be more realistic: ready for the fatality!