Skip to content

Commit

Permalink
fixed dataset legal bug and added guesser review
Browse files Browse the repository at this point in the history
  • Loading branch information
TheJDen committed Sep 25, 2023
1 parent a77be45 commit c061322
Show file tree
Hide file tree
Showing 2 changed files with 231 additions and 25 deletions.
22 changes: 11 additions & 11 deletions synthetic_dataset.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,8 @@
"text": [
"('WINTER', 'PATH', 'FESTIVAL', 'POISON')\n",
"(0, 1, 3)\n",
"('summer', 'driveway', 'plague')\n",
"('skiing', 'node', 'pill')\n"
"('weather', 'street', 'drug')\n",
"('skiing', 'graph', 'pill')\n"
]
}
],
Expand Down Expand Up @@ -165,7 +165,7 @@
" return tuple(clueword_from_dataset(datamuse_dataset, word, seed=seed) for word in codewords)\n",
"\n",
"def legal(keyword, word):\n",
" return word not in keyword and word in google_news_wv\n",
" return (keyword not in word) and (word not in keyword) and word in google_news_wv\n",
"\n",
"def codewords(keyword_card, code):\n",
" return [wv_loader.official_keyword_to_word(keyword_card[i]) for i in code]\n",
Expand Down Expand Up @@ -199,7 +199,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -253,7 +253,7 @@
" <td>BLOOD</td>\n",
" <td>throttle</td>\n",
" <td>electricians</td>\n",
" <td>bloodline</td>\n",
" <td>ancestry</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
Expand All @@ -275,7 +275,7 @@
" <td>BLOOD</td>\n",
" <td>throttle</td>\n",
" <td>leg</td>\n",
" <td>bloodline</td>\n",
" <td>ancestry</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
Expand All @@ -285,7 +285,7 @@
" <td>FOOT</td>\n",
" <td>BLOOD</td>\n",
" <td>throttle</td>\n",
" <td>bloodline</td>\n",
" <td>ancestry</td>\n",
" <td>electricians</td>\n",
" <td>4</td>\n",
" </tr>\n",
Expand All @@ -296,10 +296,10 @@
"text/plain": [
" keyword1 keyword2 keyword3 keyword4 clue1 clue2 clue3 \\\n",
"0 BUTTERFLY PLUMBER FOOT BLOOD throttle electricians leg \n",
"1 BUTTERFLY PLUMBER FOOT BLOOD throttle electricians bloodline \n",
"1 BUTTERFLY PLUMBER FOOT BLOOD throttle electricians ancestry \n",
"2 BUTTERFLY PLUMBER FOOT BLOOD throttle leg electricians \n",
"3 BUTTERFLY PLUMBER FOOT BLOOD throttle leg bloodline \n",
"4 BUTTERFLY PLUMBER FOOT BLOOD throttle bloodline electricians \n",
"3 BUTTERFLY PLUMBER FOOT BLOOD throttle leg ancestry \n",
"4 BUTTERFLY PLUMBER FOOT BLOOD throttle ancestry electricians \n",
"\n",
" code_index \n",
"0 0 \n",
Expand All @@ -309,7 +309,7 @@
"4 4 "
]
},
"execution_count": 14,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Loading

0 comments on commit c061322

Please sign in to comment.