Skip to content

Latest commit

 

History

History
182 lines (122 loc) · 8.92 KB

noodle_help.md

File metadata and controls

182 lines (122 loc) · 8.92 KB

Noodle is a tool to find words or phrases that match certain conditions.

It's similar to Regular Expressions, Nutrimatic, qhex Word Play, or Qat.

Quick Reference

  • a or A -- the letter a itself (case-insensitive)
  • ' (apostrophe) -- any punctuation, such as an apostrophe, dash, or period.
  • _ (underscore) -- space (word boundary)
  • . -- any letter
  • [abc] or [a-c] -- one of a, b, or c
  • [^abc] -- one letter except a, b, or c
  • * -- zero or more copies of the previous symbol
  • + -- one or more copies of the previous symbol
  • ? -- one or zero copies of the previous symbol
  • {3} -- exactly three copies of the previous symbol
  • {3,} -- at least three copies of the previous symbol
  • {,5} -- at most five copies of the previous symbol
  • {3,5} -- between three and five (inclusive) copies of the previous symbol
  • (abcd) -- group of abcd, usually used with *, +, ?, or {…}.
  • (ab|cd|ef) -- either ab, cd, or ef
  • <ate> -- anagram of ate: ate, eat, eta, tea
  • <ate+> -- superanagram of ate: abate, acute, fated, neat, …
  • <ate+3> -- transadd of 3 to ate: abated, advent, basket, …
  • <ate-> -- subanagram of ate: ate, at, a, eat, …
  • <ate-1> -- transdelete of 1 to ate: at, Ta
  • (ate:-) -- subset of ate: ate, at, a
  • (ate:+) -- superset of ate: abate, acted, fated, …
  • (abcd:^) -- substring of abcd: a, cd
  • !_ -- use explicit spaces for this line
  • !' -- use explicit punctuation for this line
  • !1 -- use fuzzy search for this line, within an edit distance of 1
  • 4 5 on its own line -- enumeration: match 4 letters, a space, then 5 letters
  • VOWEL=[aeiou] on its own line -- define a macro VOWEL to use in later lines
  • //, /*…*/ -- comment, ignore text (like in C, Javascript, etc.)
  • UI Tips

Help

Basics

Specify filters in the input textbox. Each line is treated as a noodle expression. You can specify multiple expressions, and only results that match all expressions are returned.

The query runs until one of the following:

  • The input wordlist is exhausted, combining up to 10 words into a phrase
  • The maximum number of results have been returned (default: 100)
  • 150 seconds have passed
  • The Stop button is pressed

Noodle Expressions

Regular Expressions

Noodle supports the following regular expression syntax: […], [^…], ., *, +, ?, (…), |, {…}.

Before matching, words are converted to lowercase and stripped of whitespace and non-alphabetical symbols (punctuation, numbers).

To explicitly match spaces, include "!_" at the end of the expression. When enabled, spaces can be explicitly matched with the "_" character.

To explicitly match other symbols, include "!'" at the end of the expression. When enabled, these symbols can be matched with the "'" character.

Regardless of setting, and unlike normal regular expressions, the period (".") is only equivalent to "[a-z]". To match any symbol, use "[a-z'_]".

Noodle expressions do not support backreferences (e.g. "\1"). Additionally, because the input is pre-processed to have a limited alphabet, noodle expressions do not support escape characters, or character classes like "[:alpha:]".

Anagram constraints

Noodle has additional support for anagram-like constriants with angle bracket syntax: <...>

  • <abcd> -- anagram of abcd: rearranging the given letters
  • <abcd+> -- superanagram of abcd: rearranging at least the given letters
  • <abcd+3> -- transadd of 3 to abcd: rearranging all of the given letters plus N wildcards
  • <abcd-> -- subanagram of abcd: rearranging at most the given letters
  • <abcd-1> -- transdelete of 1 to abcd: rerranging all but N of the given letters
  • (abcd:-) -- subset of abcd: contained within a subset of the given expression, in the same order
  • (abcd:+) -- superset of abcd: contains the superset of the given expression, in the same order
  • (abcd:^) -- substring of abcd: contained within the given expression (consecutively)

Anagram constraints are not compatible with fuzzy matching, and may result in false positives (but not false negatives!).

Enumerations

Bare numbers are a shortcut to define an enumeration.

The expression 3 3 8 7 looks for a 4-word phrase, consisting of two 3-letter words, followed by an 8-letter word, then a 7-letter word.

Fuzzy matching

Noodle supports performing fuzzy matching for certain expressions.

This will find words & phrases that would match within a given edit distance of the expression.

To allow matches within edit distance 2, include "!2" at the end of the expression.

Fuzzy matching can make queries take much longer, so it works best when there are additional constraints.

Fuzzy Caveats

If there are multiple constraints with fuzzy matching, the edits between expressions may not be consistent. For example, "hey" will match the query "hen !1; hay !1" even though the edits to get to "hen" or "hay" are different.

Anagram-like constraints ("<…>") are incompatible with fuzzy matching, and may produce false positives.

Macros

Macros allow you to define a common subexpression, which can be useful when working with repeated letters from a letterbank.

Macros are defined with NAME=expression... syntax on their own lines.

Macros are substituted in later lines before parsing, using a naive find-replace in the order they are defined.

Useful Macros

  • STATE=(al|ak|az|ar|ca|co|ct|de|fl|ga|hi|id|il|in|ia|ks|ky|la|me|md|ma|mi|mn|ms|mo|mt|ne|nv|nh|nj|nm|ny|nc|nd|oh|ok|or|pa|ri|sc|sd|tn|tx|ut|vt|va|wa|wv|wi|wy)
  • ELEMENT=(h|he|li|be|b|c|n|o|f|ne|na|mg|al|si|p|s|cl|ar|k|ca|sc|ti|v|cr|mn|fe|co|ni|cu|zn|ga|ge|as|se|br|kr|rb|sr|y|zr|nb|mo|tc|ru|rh|pd|ag|cd|in|sn|sb|te|i|xe|cs|ba|hf|ta|w|re|os|ir|pt|au|hg|tl|pb|bi|po|at|rn|fr|ra|rf|db|sg|bh|hs|mt|ds|rg|cn|uut|fl|uup|lv|uus|uuo|la|ce|pr|nd|pm|sm|eu|gd|tb|dy|ho|er|tm|yb|lu|ac|th|pa|u|np|pu|am|cm|bk|cf|es|fm|md|no|lr)

UI Tips

Keyboard shortcuts

  • Ctrl-Enter -- submit query

Quick Links

Next to each result, there are 3 links to common actions:

  • c -- copy the result to the clipboard
  • g -- look up the result on Google
  • w -- look up the result on Wikipedia
  • x -- look up the result as a clue on Crossword Solver

Google Sheets Integration

You can query Noodle directly from Google Sheets! Here's an example formula:

=IMPORTDATA(CONCAT("https://noodle.fly.dev/query/", ENCODEURL("yourqueryhere")))

You can wrap it in TRANSPOSE(...) to have it fill out horizontally instead of vertically.

You can separate mutli-line queries with semicolons (;) instead of newlines.

For GET requests like this, the timeout is lowered, default results limit is lowered to 15 (this can be changed with e.g. #limit 100;).

Wordlist

The input wordlists are described below, and can be downloaded by following these links:

  • default: combination of Wikipedia titles, page content, and Wiktionary. Filtered slightly based on frequency.
  • dumpling: all answers available in dumpling, contains "crosswordese" and phrases.
  • npl-allwords2: "allwords2.txt" wordlist from NPL's website.
  • scrabble: Collins Scrabble words (2019).
  • pokemon: all pokemon names, gen 1-9.
  • wiktionary: all words defined in English Wiktionary, including "forms" of words.
  • wiki-titles: all individual words in English Wikipedia titles, without any frequency filter.

It is based on the Debian wordlist, Wikipedia, and Wiktionary.

Learn More

Noodle is open-source and released under the MIT license.

Visit GitHub to fork the code or submit bugs. There is also a command-line version available for running offline/locally.

Similar Tools

  • Regular Expressions, such as Regex Dictionary
    • Regular expressions are very common in programming, and can be used in Google Sheets
  • Nutrimatic
    • Better at ordering results & constructing realistic phrases
  • qhex Word Play tool
    • Extensive wordlist, supports "cross-filtering" for matching derivative words
  • Qat
    • Semantic search (e.g. "synonym to..."), complex "equation solver"