3 ms·
I get the point of wanting to be able to address scenarios that you haven't seen before, but in this particular instance, is it really that much help to be able
by Vraxx 10y ago
I get the point of wanting to be able to address scenarios that you haven't seen before, but in this particular instance, is it really that much help to be able to classify a program that isn't technically written in any programming language (ie. it's invalid)?
- riscy 10y ago> be able to classify a program that isn't technically written in any programming language (ie. it's invalid)? I wouldn't go so far as saying it's 'invalid'. It's a perfectly reasonable new language that the classifier hasn't encountered, yet whose style is heavily rooted in languages the classifier has been trained on. If we require that all programs we feed it are a valid program in one of a handful of languages it expects, we could've just run a parser for each language on the given input and call it a day. Trying to classify a weird language like this is where the machine learning aspect of the work really shines.
- Vraxx 10y agoAh, yes. That makes a lot more sense than how I was thinking about it. It would still be marginally better than just attempting to validate the code in expected languages because it would probably handle typos and other simple syntax errors, as well as snippet problems (like not declaring a certain variable in the snippet), but I can see where the output on an "invalid" program could be useful now.