Uses a neural network to generate random text samples based on website text from a URL.
Applicable Scenarios and Problems
This algorithm works best with simple, clean websites since it uses all visible text to train the neural network.
|url||URL of text to train neural network on|
|result||Five generated samples of random text from the trained model|
In this example, the neural network is trained on a simple webpage that describes how to make websites. Very meta.
The results show five generates samples from the trained neural network.
[ "lessons main least markup lessons more by english sure", "bold code extras other thoughts u lots others practice isn typing code literary same these their coded only", "over brackets accessories\\ programs\\ sounds program texts useful starting proof your case language in programs\\ preface write opened", "computer underlying starting ve would by have cornflake inserted practice inserted menu own write open\\ computer out program", "! underlying most u going sounds already pick programs\\ slip other content what thoughts useful code correct format" ]
This example is a post on r/python, note that there is a lot of visible text in the nav areas. This could be cleaned up by scraping for only the webpage elements of interest.
The output makes it clear that we are on r/python and that most of the text was gathered from the nav elements on the webpage.
[ ", ) ) a python / . r . . python . ( python . . . python", "of of . add ( . . . the / . python python . ( ) notebooks to", "/ of : . ) : . : python for ( . ( : ) . . module", ". the . . ) . ) \" python python python . . python python . ( python", ". . . for following . python . . . . python . python python python , python" ]