Hacker News new | ask | show | jobs
Show HN: Palindromes.py – spits out single-word and multi-word palindromes (github.com)
1 points by robtoscani 78 days ago
palindromes.py is a Python3 program that generates a random or sorted stream of single-word and multi-word palindromes in a given language, including the optional words - whether or not existing - given as argument(s).

Various properties can be set to manipulate and filter the results, such as:

- the language in which the palindromes are to be generated (default is Dutch); - approximate palindrome length; - the minimum word length in the generated palindromes; - the maximum number of words per palindrome; - any characters to be excluded from the palindromes; - the number of palindrome results.

As an example, the following command:

  ./palindromes.py -a -c20 -l4 -L25
may render the following (random) output:

  deleverages Sega reveled
  derogating Nita gored
  remarking Agni Kramer
  débutantes Etna tubed
  débutante Etna tubed
  ululating Nita Lulu
  spoonerism siren oops
  allegro boga Iago Borg Ella
  allegro boga sago Borg Ella
  noontime's emit noon
  gardener's Rene drag
  gulp's orb's Bros plug
  redraw drab bard warder
  stalwarts straw lats
  procedure rude Corp
  procedure rude corp
  snits GNU's Sung's tin's
  snits GNU's Sung's tins
  spillways yawl lip's
  spillways yawl lips