init
This commit is contained in:
14
spider/action_recordword.py
Normal file
14
spider/action_recordword.py
Normal file
@ -0,0 +1,14 @@
|
||||
from models import WordData, Session
|
||||
|
||||
|
||||
words = []
|
||||
with open("./google-10000-english.txt", "r") as f:
|
||||
words = f.readlines()
|
||||
|
||||
with Session() as session:
|
||||
for word in words:
|
||||
newword = WordData(word=word.strip())
|
||||
# newword = WordData(spelling=word.strip())
|
||||
session.add(newword)
|
||||
|
||||
session.commit()
|
Reference in New Issue
Block a user