tunaLandslide / HonorsContract

This is a project for a computational methods class, its purpose is to generate random sentences following the statistical rules of the input text. This project is free to use.
0 stars 0 forks source link

example #2

Open orbeckst opened 6 years ago

orbeckst commented 6 years ago

Can you add a directory examples with a test input text, a script that uses your code to read the input and generate output, and the output text? A user should be able to follow the instructions, produce the same output that you show, and then be able to experiment form themselves.

Texts

https://www.gutenberg.org/ has many texts under available under permissible licenses.

A short one would be Lincoln's Gettysburg Address – you can get the plain text version with

curl --silent -L http://www.gutenberg.org/ebooks/4.txt.utf-8  > lincoln_gettysburg_address.txt

The file starts with lots of legal text at the top. Maybe you can modify your code so that it reads a text file from a certain part onwards?

Getting data from the internet

You can also use the Python requests package to directly get content from the internet.

If you use Beautiful Soup you could also load wikipedia pages and parse the text from the html.

orbeckst commented 6 years ago

if extext.txt is an example text then put it into examples. Furthermore, if you did not write the text yourself you must add an attribution and state the license that you are using the text under. You may not use/copy/include a text for which you do not have license to do so.

orbeckst commented 6 years ago

You are not complying with the licenses of the texts that you included:

Please understand that just because something is visible on the internet it does not give you any rights to use it as you please.