Code Monkey home page Code Monkey logo

wordsearch's Introduction



The Wordsearch Solver

A wordsearch solver with quick image input and an interactive viewer.

Live Site | Launch Blog Post

Solving a wordsearch is basically two dimensional string search. This wordsearch solver makes it easy to input wordsearches, solve them and view the results interactively.

How it Works

There are two ways to enter a puzzle into this solver.

  1. Using a text input. The puzzle and words are entered into text boxes. DraftJS is used for the puzzle text box to ensure that the area around each letter is a square instead of a rectangle for easier input.

    text-input

  2. Using an image selector. After an image is selected, it is sent to the google cloud vision api which returns a list of letters in the image and their bounding boxes. The user is prompted to select the region of the puzzle and the regions of each of the words in the image. The selected letters from the puzzle are arranged into a grid of letters using a kernel density estimator to find the rows and columns making up the puzzle, then finding the letters nearest to grid intersections.

    image-input

Now that the puzzle and the words to find have been imported we have enough information to send to the wordsearch solver algorithm.

The wordsearch solver algorithm takes in a puzzle along with a list of words and returns a list of matches (word -> list of nodes making up a word).

The result is displayed in an interactive viewer.

view

wordsearch's People

Contributors

0xcaff avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wordsearch's Issues

Add Go Back

Make sure there is a way to go back from ViewPuzzle to TextInput in all cases:

  1. ImageInput -> TextInput -> ViewPuzzle -> TextInput
  2. TextInput -> ViewPuzzle -> TextInput
  3. InputSelection (demo puzzle) -> ViewPuzzle -> TextInput

Colors

Some people thing the design is bland and boring. Consider adding colors.

Better Perfomance Testing

TODO:

  • Stop Using Babel Node (might require splitting the wordsearch solving code into its own package)
  • Add Data With More Variety
  • Report Aggregate Results

Improve Image Handling

Currently, the image handling works for most cases but not in some (high resolution images).

  • Test Pipeline
  • Improve

Some ideas for improve are to use quartiles to find outliers instead of variance.

Write Readme and Make Demo Video

The Demo Video Should:
Show how easy solving a Wordsearch is:

  • by the image flow

  • by the text flow

  • display the interactiveness of the ui

  • show mobile friendless

  • talk about some of the challenges faced when building (fast ui, wordsearch algorithm, point extraction)

  • Favicon

Search Results

Currently, when searching google for wordsearch solvers the website doesn't come up. Something needs to be done about search engine optimization.

Use TypeScript

Not using typescript is making this really stressfull.

Default Word Lists

Include a default list of words so people can try to solve wordsearches which don't come with word lists. Some performance testing should be done with the algorithm to check whether this is feasible.

Improve Page Load Time

Most of the content can be compiled into static pages. This will allow the pages to be cached and speed up load time.

Get The Word Out

Structured Source Code

Everything is in a big directory. It could be split into a few more directories to improve readability.

  • routes (contains the root component at each route)
  • components (contains all other component, TextEntry)
  • components/grid (contains stuff for grid)
  • processing (contains code for processing images and utils.js).

ViewPuzzle Show Lines Around Matches

Given a blob of nodes which are a part of a match, it is difficult to tell which directions the words go. Up and down? Left and right? Diagonally?

Image Input Hidden Actions

In the image input, some things are hard to see:

  • List Of Words
  • Actions at Bottom of Page
  • Prompt for What to Do

Image Input Mark Already Selected Nodes

After selecting a bounding box for either a puzzle or a word, it isn't immediately obvious that the bounding box was already used as part of a word or puzzle.

Persistent Wordsearches

Allow people to create, share and modify (copy on write) wordsearches. No editing. No user management. This can be implemented easily with Firebase firestore (free tier). It must support the following:

  • View A Stored Wordsearch By ID
  • Browse Stored Wordsearches
  • Add Wordsearches (Puzzle, Source Image, Tags, Title)

CSS Structure

Figure out the correct way to do CSS.

Here is the css which needs to be migrated:

Accessibility

Add keyboard shortcuts to the List and the ImageInput.

List:

  • Allow Focusing by Tabbing to Element (3336708)

ImageInput:

  • Continue To Next Step by Pressing Enter

Google Result Empty

When googling this page, nothing comes up in the text area of the search result.

image

The cached view is also blank. It seems to be caused by react router.

image

Add Demo Images

Allow people to experience the ease of solving a wordsearch even if they don't have a wordsearch to solve.

onMouseLeave Fallback

onMouseLeave isn't run sometimes when exiting a node. This causes the highlight to remain until another selection is made.

Safari Wonky Grid

Something is wrong with the way the grid is rendered in Safari. The cells aren't all squares perfectly.

Default Word Lists

Allow for throwing a dictionary with 1000s of words at the solver. This would make it possible for solving mystry wordsearches which don't come with a list.

Strange Image Selection Issue

The selection doesn't seem to work with certain images: tree.search returns an empty array.

Here's an example image: nephibuildsaship_wordsearch

It seems to be a problem in rbush.

Remove Puzzles from Worker Bundle

It isn't used and shouldn't be bundled. There are two ways to fix this:

  • Investigate why the tree shaking isn't removing it and make tree shaking remove it.
  • Move the puzzles into their own module and don't import them in wordsearch-algo or the web worker.

TextInput Buggy in Chrome

It works fine in firefox. Chrome doesn't account for the letter-spacing in the line width. Might want to switch to something which uses content editable.

Highlight Broken

Mousing over a word in the puzzle doesn't trigger a highlight.

Analytics

  • Differentiate the version with analytics from the version without analytics.
  • Decide which analytics platform to use.
  • Setup Analytics

I need an analytics solution which does the following:

  • Number of Users Visiting Site
  • Which Flows People are Using
  • Doesn't track wordsearches and images input.
  • Tracks whether or not the wordsearch is an example.

My options are:

  • Google Analytics (Tried, True and Legacy Feeling)
  • Cloudflare Analytics (Easy, Fast, Server-Side, not enough data)
  • Segment
  • Amplitude Analytics
  • Parsely
  • Mixpannel
  • Keen.IO (looks like lots of work to analyze data)

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.