From 26d986c198a4795e927898088213144fb9f75c3f Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sun, 31 Jul 2016 00:54:16 +1200 Subject: Remove poetry games tinkering scripts Moving these into their own suite shortly --- games/hku | 17 -------------- games/syl | 71 ---------------------------------------------------------- games/wrdl | 10 --------- games/wrds | 3 --- man/man6/syl.6 | 18 --------------- 5 files changed, 119 deletions(-) delete mode 100755 games/hku delete mode 100755 games/syl delete mode 100755 games/wrdl delete mode 100755 games/wrds delete mode 100644 man/man6/syl.6 diff --git a/games/hku b/games/hku deleted file mode 100755 index 4deb7460..00000000 --- a/games/hku +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env bash -hash syl || exit -declare -a lsts ws -lsts=(5 7 5) -for ((lc=0;lc<${#lsts[@]};lc++)) ; do - ws=() - for ((sc=0;sc 1)) ; then - case $lcword in - - # Exceptions first - *[bcdgptx]le|*c[mn]e|*phe) - ;; - *[!aeiouy]e) - ((sylc--)) - ;; - - # "pined", "loved", but not "wasted", "devoted" - *[bcdgptx]led) - ;; - *[!aeiotuy]ed) - ((sylc--)) - ;; - - # Plural forms of the above - *[bc]les|*c[mn]es|*phes) - ;; - *[!aeiousy]es) - ((sylc--)) - ;; - esac -fi - -# Add a syllable for an "ism" suffix -case $lcword in - *ism|*isms) - ((sylc++)) - ;; -esac - -# Print the determined syllable count -printf '%u\n' "$sylc" diff --git a/games/wrdl b/games/wrdl deleted file mode 100755 index 2b482514..00000000 --- a/games/wrdl +++ /dev/null @@ -1,10 +0,0 @@ -#!/usr/bin/env bash -cat -- "${@:-/dev/stdin}" | -while read -r -a ws ; do - for w in "${ws[@]}" ; do - w=${w%%[^a-zA-Z]*} - w=${w##*[^a-zA-Z]} - [[ $w ]] || continue - printf '%s\n' "$w" - done -done | tr '[:upper:]' '[:lower:]' diff --git a/games/wrds b/games/wrds deleted file mode 100755 index e56cc363..00000000 --- a/games/wrds +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh -grep -v \''s$' /usr/share/dict/words | -shuf -n "${1:-10}" diff --git a/man/man6/syl.6 b/man/man6/syl.6 deleted file mode 100644 index 98b90e11..00000000 --- a/man/man6/syl.6 +++ /dev/null @@ -1,18 +0,0 @@ -.TH SYL 6 "June 2016" "Manual page for syl" -.SH NAME -.B syl -\- make a crude guess as to the number of syllables of a word -.SH USAGE -.B syl -syllable -.br -.B syl -canapé -.SH DESCRIPTION -.B syl -applies some very crude heuristics to guess at the number of syllables that -would be used if the Latin-alphabet word on the command line were spoken out -loud. It is far too inaccurate for any serious use, particularly for languages -other than English; the author uses it for poetry generation. -.SH AUTHOR -Tom Ryder -- cgit v1.2.3