When loading the ClueDB, construct an N-gram index of the clues. Then similar (but not necessarily exact) clues can be found in the database (#4).
Currently this changes the API of the ClueDB to have two methods:
search(clue, threshold): Returns similar clues in the database within threshold match.
answers(clue): Returns answers for the given clue, which must exist in the database.
It also removes the previously unused map of answers of a given length, and changes the serialization to match. The test fixtures would need to be updated to match the new serialization format.
When loading the ClueDB, construct an N-gram index of the clues. Then similar (but not necessarily exact) clues can be found in the database (#4).
Currently this changes the API of the ClueDB to have two methods:
search(clue, threshold)
: Returns similar clues in the database withinthreshold
match.answers(clue)
: Returns answers for the given clue, which must exist in the database.It also removes the previously unused map of answers of a given length, and changes the serialization to match. The test fixtures would need to be updated to match the new serialization format.