Code Monkey home page Code Monkey logo

crossword's Introduction

Crossword

This is a tool that can generate many crossword puzzles. It uses definitions from an old dictionary as the hints. Has more than 10k words with different spellings. Has around 50k different definitions, some words have multiple definitions.

Example

example of generating the hints for one of the puzzles stored on 4_5_puzzles.txt:

erl
c(crossword).%this compiles the program. you only need to do it once.
c(puzzle_maker).%this compiles the program. you only need to do it once.
D = crossword:load_dict().%this takes several seconds.
[PuzzleText, Hints] = puzzle_maker:make_4_5(D).

[{<<"slamhaleabitrearelse">>,
  [<<"slam">>,<<"hale">>,<<"abit">>,<<"rear">>,<<"else">>],
  [<<"share">>,<<"label">>,<<"alias">>,<<"metre">>]},
 {[<<"The act of one who, or that which, slams.">>,
   <<"Welfare.">>,<<"3d sing. pres. of Abide.">>,
   <<"To place in the rear; to secure the rear of.">>,
   <<"Otherwise; in the other, or the contrary, case; if the facts were different.">>],
  [<<"The pubes; the sharebone.">>,
   <<"To affix a label to; to mark with a name, etc.; as, to label a bottle or a package.">>,
   <<"A second or further writ which is issued after a first writ has expired without effect.">>,
   <<"A measure of length, equal to 39.37 English inches, the standard of linear measure i"...>>]}]
6> 

to quit the erl shell: halt().

Navigating the files

Here are the 20 000 most common words, according to google

Here are the words from a dictionary from 1913. It is on project Gutenburg

here are the 4x5 puzzles in a plain text data file other files in the same folder contain more puzzles. Does not contain hints.

this program is able to choose a random puzzle from 4_5_puzzles.txt, and generate the hints for it.

this program is able to look at the 20k words from google, find the subset of them that are defined in the dictionary from 1913, and then generate all possible crossword puzzles for a given board using those words.

example of using crossword to find all combinations of words that make valid boards:

c(crossword).%this compiles the program. you only need to do it once.
D = crossword:load_dict().
Boards = crossword:word_combos(D).

crossword's People

Contributors

zack-bitcoin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.