danmermel / cryptario

Cryptic crossword solver
0 stars 0 forks source link

Charades #28

Closed glynnbird closed 4 years ago

danmermel commented 4 years ago

Everyone was in debt - that's permitted (7) - ALLOWED

Vehicle seen by people in opera (6) - CARMEN

Book matches are new things (9) - NOVELTIES

Weapon used by many a Round Table knight (8) - LANCELOT

A country girl reading (7) - PERUSAL

Obvious disagreement for one in court (9) - PLAINTIFF

danmermel commented 4 years ago

Book binds are innovations (9) - NOVELTIES Everyone was in debt - that's permitted (7) - ALLOWED

danmermel commented 4 years ago

Find a "definition" indicator (the thing that allows us to split the clue), e.g. "are" The words following the indicator(s) are the definition, e.g. innovations Then break the subsidiary into two parts and get synonyms of those (book = novel, reserve; binds = ties, lashes) Then make "words" out of the cartesian product of both lists of synonyms novelties novellashes reserveties reservelashes Look in our dictionary to see how many of those are actual words (novelties) see if any of the actual words is a synonym of the defintion (innovations = novelties)

danmermel commented 4 years ago

PROBLEM: We are producing a cartesian product of words that is 10000 words long and each one has to be consulted in the database... this takes too long!

We need to make this lookup local by building the dictionary locally:

Run thru proddata file and turn it into a js module that we can require then we can consult it!

proddata needs to be normalised (lower case, get rid of multi words etc)

danmermel commented 4 years ago

finish the retval and tidy up!