heatherleaf / crossword-maker

A simple web-based tool for building your own crosswords
https://heatherleaf.github.io/crossword-maker/crossword.html
GNU General Public License v3.0
8 stars 5 forks source link

Sort the matching words according to theme / frequency / whatever #13

Closed heatherleaf closed 3 years ago

heatherleaf commented 3 years ago

The matching words are now shown in alphabetical order, and if there are too many matches there's a random selection. One could instead sort the words according to frequency, or some other ranking (e.g. similarity to a given theme). And let the ranking decide the random distribution.

heatherleaf commented 3 years ago

Here's a simple algorithm for weighted random sampling:

heatherleaf commented 3 years ago

Solved in 15bd5cc8a67ce762a6afad8d61beca9ca98a6f59