News for hackers. Stuff that matters.
Re:PHP code generated by GPT-2 by fffrantz on Tuesday February 26, 2019 @08:28AM (#19254075)
"Accidentally picked up" Somehow they must have fed it with some JavaScript and some php, right ?
Re:PHP code generated by GPT-2 by moyix on Tuesday February 26, 2019 @09:03PM (#19260237)
Yeah, the dataset was 40GB of text from pages linked from Reddit, so I imagine it was quite hard to clean it to just English text. They also noted in their paper that it "accidentally" learned to translate English into French, even though they removed non-English web pages, because of examples like

"I’m not the cleverest man in the world, but like they say in French: Je ne suis pas un imbecile [I’m not a fool]."

Re:PHP code generated by GPT-2 by tyingq on Tuesday February 26, 2019 @08:31AM (#19254097)
Yes. But that's the sort of hype that seems to be desired. "OMG zombies, we accidentally put some bad samples in the training data"
Re:PHP code generated by GPT-2 by kowdermeister on Tuesday February 26, 2019 @08:30AM (#19254088)
With sloppy scraping I guess JS was picked up besides text.

PHP should be intentionally used as training material.

Re:PHP code generated by GPT-2 by lugg on Tuesday February 26, 2019 @10:42AM (#19255161)
Sloppy scraping?

You forget html and JS is perfectly valid syntax to find in a .php file.

Re:PHP code generated by GPT-2 by kowdermeister on Tuesday February 26, 2019 @11:28AM (#19255655)
Yes, of course. But JS is frontend mostly, so I can imagine it's easier to accidentally scrape some JS with text.

PHP, not so much, only if the server returns source by accident.

Re:PHP code generated by GPT-2 by yorwba on Thursday February 28, 2019 @05:58AM (#19270480)
What if the server is GitHub? Or some random blog about PHP development? There are lots of situations where it's very intentional that PHP is contained in HTML.