Javierss commited on
Commit
5b2d6bc
·
1 Parent(s): e29ad33

Change words format

Browse files
.gitattributes CHANGED
@@ -39,3 +39,4 @@ config/w2v_models/eng_w2v_model filter=lfs diff=lfs merge=lfs -text
39
  config/words.txt filter=lfs diff=lfs merge=lfs -text
40
  config/words.gz filter=lfs diff=lfs merge=lfs -text
41
  config/w2v_models/words.gz filter=lfs diff=lfs merge=lfs -text
 
 
39
  config/words.txt filter=lfs diff=lfs merge=lfs -text
40
  config/words.gz filter=lfs diff=lfs merge=lfs -text
41
  config/w2v_models/words.gz filter=lfs diff=lfs merge=lfs -text
42
+ config/possible_words.json filter=lfs diff=lfs merge=lfs -text
__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
 
config/{w2v_models/words.gz → possible_words.json} RENAMED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:5c780ccc91b8a82e6b6614ba4ff9530819cf902cb82d780691e91e493a82403b
3
- size 9075563
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cef4a470f69d0ca0248cb14bd11ba7bdbf53eb9aafcba8d9bef7539d2cd9b156
3
+ size 29073249
data/ranking.txt CHANGED
@@ -1,10 +1,4 @@
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]
 
1
+ ['#2', 'amigo', 7.62]
2
  ---------------------------
3
+ ['#2', 'amigo', 7.62]
4
+ ['#1', 'loco', 6.76]
 
 
 
 
 
 
game_transformer.py CHANGED
@@ -24,7 +24,7 @@ class Semantrix:
24
 
25
  config_file_path = "config/lang.json"
26
  secret_file_path = "config/secret.json"
27
- possible_words_file_path = "config/w2v_models/words.gz"
28
  data_path = "data/"
29
 
30
  class DictWrapper:
@@ -53,8 +53,8 @@ class Semantrix:
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
 
 
24
 
25
  config_file_path = "config/lang.json"
26
  secret_file_path = "config/secret.json"
27
+ possible_words_file_path = "config/possible_words.json"
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 open(self.possible_words_file_path, "r", encoding="utf-8") as json_file:
57
+ self.possible_words = json.load(json_file)
58
 
59
  def prepare_game(self, difficulty):
60