commited all contents created by participants

This commit is contained in:
Bachir Soussi Chiadmi
2017-12-21 18:12:40 +01:00
parent cefd1c2ad0
commit b936b1e616
2137 changed files with 1076319 additions and 730 deletions
@@ -0,0 +1,23 @@
import re
source = open("scripts/frankenstein_gutenberg.txt", "r")
#source = open("joyce.txt", "r")
# destination = open("perec.txt", "w")
regex = r'(\w*p+\w*e+\w*r+\w*e+\w*c+)'
#regex = r'(\w*e+\w*l+\w*i+\w*f+\w*)'
# destination.write("Source: George Orwell's 1984\n\n\n")
# destination.write("Source: James Joyce, Almost complete works\n\n\n")
sentences = []
perec = ''
for line in source:
words = line.split(" ")
for word in words:
if re.search(regex, word):
# print(word)
perec+='<p>'+word+'</p>'
# destination.write(word+'\n')
print perec