Javierss commited on
Commit
ace94db
·
1 Parent(s): 5fef7f9

Change words file extension and reduce lenght

Browse files
__pycache__/app.cpython-311.pyc CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
 
__pycache__/game_transformer.cpython-311.pyc CHANGED
Binary files a/__pycache__/game_transformer.cpython-311.pyc and b/__pycache__/game_transformer.cpython-311.pyc differ
 
__pycache__/game_word2vec.cpython-311.pyc CHANGED
Binary files a/__pycache__/game_word2vec.cpython-311.pyc and b/__pycache__/game_word2vec.cpython-311.pyc differ
 
config/words.gz ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5c780ccc91b8a82e6b6614ba4ff9530819cf902cb82d780691e91e493a82403b
3
+ size 9075563
data/ranking.txt CHANGED
@@ -1 +1,10 @@
1
- ---------------------------
 
 
 
 
 
 
 
 
 
 
1
+ ['#8', 'pincel', 8.3]
2
+ ---------------------------
3
+ ['#8', 'pincel', 8.3]
4
+ ['#3', 'biden', 7.19]
5
+ ['#2', 'amigo', 6.41]
6
+ ['#1', 'loco', 6.28]
7
+ ['#6', 'table', 5.68]
8
+ ['#7', 'bidet', 5.53]
9
+ ['#5', 'smith', 4.74]
10
+ ['#4', 'joe', 4.59]
game_transformer.py CHANGED
@@ -1,5 +1,6 @@
1
  # %%
2
  import json
 
3
  import random
4
  from datetime import datetime
5
  import numpy as np
@@ -23,7 +24,7 @@ class Semantrix:
23
 
24
  config_file_path = "config/lang.json"
25
  secret_file_path = "config/secret.json"
26
- possible_words_file_path = "config/words.txt"
27
  data_path = "data/"
28
 
29
  class DictWrapper:
@@ -52,11 +53,8 @@ class Semantrix:
52
  with open(self.data_path + "ranking.txt", "w+") as file:
53
  file.write("---------------------------")
54
 
55
- with open(self.possible_words_file_path, "r") as file:
56
-
57
- data = file.read()
58
-
59
- self.possible_words = data.split("\n")
60
 
61
  def prepare_game(self, difficulty):
62
 
 
1
  # %%
2
  import json
3
+ import gzip
4
  import random
5
  from datetime import datetime
6
  import numpy as np
 
24
 
25
  config_file_path = "config/lang.json"
26
  secret_file_path = "config/secret.json"
27
+ possible_words_file_path = "config/words.gz"
28
  data_path = "data/"
29
 
30
  class DictWrapper:
 
53
  with open(self.data_path + "ranking.txt", "w+") as file:
54
  file.write("---------------------------")
55
 
56
+ with gzip.open(self.possible_words_file_path, "rt", encoding="utf-8") as f:
57
+ self.possible_words = f.read().splitlines()
 
 
 
58
 
59
  def prepare_game(self, difficulty):
60