From cd3ff89ef7bb315fc77b5084a55bff0bc83b0f90 Mon Sep 17 00:00:00 2001 From: joey Date: Sun, 12 Dec 1999 22:15:30 +0000 Subject: [PATCH] * Fixed "burk" to "bork" globally. Closes: #52589 --- README | 115 ++++++++++++++++++++++++++++++++++------------- chef | 8 ++-- debian/changelog | 6 +++ 3 files changed, 95 insertions(+), 34 deletions(-) diff --git a/README b/README index f5a71ad..c8358ea 100644 --- a/README +++ b/README @@ -1,39 +1,94 @@ -This is a collection of filters from various places, including: +This is a collection of filters to do all sorts of strange things to text. +B1ff, the Swedish Chef, and an eleet filter are included. -http://www.princeton.edu/~mkporwit/pub_links/davido/slang/ +Since the original versions of these filters have copyright problems, I have +done a "clean room" re-implementation of the original lex filters in perl. I +did this without looking at the original code to the filters at all, I +simply observed their output and drew my own conclusions, and wrote my own +code. Then I compared the output of the original and new filters when ran on +large bodies of text, and fixed the things I had missed. -http://www.mathlab.sunysb.edu/~elijah/src.html +Here are the results of my investigations of how the filters work: -Collected by Joey Hess +eleet: + This is the simplest filter to figure out. The letters a-z of + the alphabet are replaced with the following letters: + 4 b c d 3 f g h 1 j |< l /\/\ /\/ 0 p q r 5 + u \/ \/\/ >< y z + Note that the equivalent translation is done on upper-case letters. +chef: + Personally my favorite filter. This took a bit of work to figure + out, and I doubt I have everything correct. Note that due to a bug + or an odd feature of the original program, it doesn't seem to think + that the first letter of the first word is really the first letter + of a word and so some of the words below don't trigger for that first + word. I did not emulate this behavior because I think it's probably a + bug. -Note that the Makefile will get the filters to compile on Linux systems. -Otherwise, you're on your own. + The word "bork" is never changed, no matter what any of these + rules may say. Neither is "Bork". + The following translations only happen to letters that are the first + letter of a word of at least 2 letters in size: + o -> oo + O -> Oo -Descriptions of the filters: + These happen to letters that are not the last letter of a word: + a -> e + A -> e -aust: Australian -b1ff: The B1FF filter -biffa: ?? -buck: The buckwheat filter -censor: [CENSORED] -chef: convert English on stdin to Mock Swedish on stdout -cockney: Cockney English -drawl: English to Texan translator -fin: ?? -fudd: Elmer Fudd -jethro: Hillbilly text filter -jive: Jive English -ken: English into Cockney, featuring (dubious) rhyming - slang for a lot of computer terminology. -kraut: German -mb: Marc Barrett posting translator -moo: The cow filter -newspeak: As in 1984 -nyc: Brooklyn English -valspeak: ?? -ky00te: This program places a very cute (and familiar to FurryMuck - fans) accent to any text file. + These translations only happen if the letter is not the first letter + of a word: + f -> ff + i -> ee (but only the first `i' per word) + o -> u + u -> oo -No racial or societal slurs are intended. For amusement only. + These translations always happen: + v -> f + V -> F + w -> v + W -> V + an -> un + An -> Un + au -> oo + Au -> Oo + + Any occurrence of "e" at the end of a word is changed to "e-a". + + Any occurrence of "e" and the beginning of a word is changed to "i". + Same with capitals. + + Any occurrence of "the" is changed to "zee", any occurrence of + "The", to "Zee". + + Any occurrence of "tion" in a word, to "shun". + + Any "th" at the end of a word is changed to "t". + + Any "en" at the end of a word is changed to "ee". + + Any "ow" at the end of a word is changed to "oo". + + And of course, after any `.', `?', or `!' that is at the end of a + line, the Chef prints out a new line, and then the famous + "Bork Bork Bork!", and then another newline. + + Known bugs in this implementation: + - says "frunch", not "french". + - still quite buggy in general. + +b1ff: + Unlike the other filters, b1ff does not try to be an exact duplicate + of its predecessor. + + After upper-casing everything, b1ff does some word and sub-word + substitutions, most of them misspellings. + + B1ff also changes punctuation - All commas become periods; all + semicolons, commas. Question and exclamation marks are changed to + things like "!!!!1!" and "?!?!?!". It looks like the original filter + decided how long a sequence to print based on the text input before + the end of sentence. I took a simpler route and just randomized it. + +Written by Joey Hess diff --git a/chef b/chef index 23d0e6a..57c3d65 100755 --- a/chef +++ b/chef @@ -35,14 +35,14 @@ s/(\b)O(\w)/$1Oo$2/g; # Fix the word "bork", which will have been mangled to "burk" # by above commands. Note that any occurence of "burk" in the input # gets changed to "boork", so it's completly safe to do this: -s/\bburk\b/bork/; +s/\b([Bb])urk\b/$1ork/g; # Stuff to do to letters that are the first letter of any word. s/\be/i/g; s/\bE/I/g; # Stuff that always happens. -s/teeun/shun/g; # this actually has the effect of changing "tion" to "shun". +s/tiun/shun/g; # this actually has the effect of changing "tion" to "shun". s/the/zee/g; s/The/Zee/g; tr/vVwW/fFvV/; @@ -56,8 +56,8 @@ s/En/Un/g; # this actually has the effect of changing "An" to "Un". s/eoo/oo/g; # this actually has the effect of changing "au" to "oo". s/Eoo/Oo/g; # this actually has the effect of changing "Au" to "Oo". -# Change "ow" at end of word to "oo". -s/uv\b/oo\b/g; +# Change "ow" to "oo". +s/uv/oo/g; # Change 'i' to 'ee', but not at the beginning of a word, # and only affect the first 'i' in each word. diff --git a/debian/changelog b/debian/changelog index dfcf4b4..534698b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +filters (2.9) unstable; urgency=low + + * Fixed "burk" to "bork" globally. Closes: #52589 + + -- Joey Hess Sun, 12 Dec 1999 14:14:41 -0800 + filters (2.8) unstable; urgency=low * makesample.sh is now careful to make sure each program is executable -- 2.39.2