Commit f8df70cc by Exhibition PI

Clear screen on first run

parent ec36f79c
......@@ -20,14 +20,15 @@ from collections import OrderedDict
import os
# open file
path = "data/glove.42B.300d.txt"
# path="data/glovesample.txt"
#path = "data/glove.42B.300d.txt"
path="data/glovesample.txt"
# declare regular expression, any letter
pattern = re.compile("[a-zA-Z]*")
# read line per line
with open(path, 'r', 1) as source:
os.system('cls' if os.name == 'nt' else 'clear')
for line in source:
# find the word
cuts = re.findall(pattern, line)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment