Fix rank computation.

This commit is contained in:
Matúš Tejiščák 2024-02-13 11:10:46 +01:00
parent ba919f8e0a
commit c8eea4e215
1 changed files with 5 additions and 5 deletions

View File

@ -68,15 +68,15 @@ while Q:
db.commit()
r = db.execute('''
select q.word, q.rank
from words q
select q.word, q.rank, z.rank
from words q, words z
where not exists (
select *
from combos c
where c.x = q.word and c.y = ?
)
''', (z,))
for q, q_rank in r.fetchall():
) and z.word = ?
''', (z, z))
for q, q_rank, z_rank in r.fetchall():
Q.add(((z, z_rank), (q, q_rank)))
time.sleep(5)