Editing
2012-10-30
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Transcript== {{Computertranscript}} :[Describe panel here] :True weinersmith tales: :I had this idea that all political speech could be improved. :If you changed :Everything- but :The nouns to " nurble, you :Could still :Follow :Everything :One of my twitter followers, Jeff Lee posted a quick and dirty program: <i>The Political Speech Nurbler.</i> <?Php :11 Extremety quick-and-dirty political speech nurbler (changes everything except nouns to :11 :suggested by Zach Weinersmith (https://twitter.com/ZachWeiner/status/261840134218063 :11 :11 Requres PHP, and part-of-speech txt from the "Part of Speech Database", available at :http://wordlist.sourceforge. net :11 :11 :Usage: php nurbler.php input-file :11 :if ($argc != 2) exit("Usage: php {$argv[0]} input-file\n"); :if (ifile_exists(Sargv[1])) exit("Error: could not find {$argv[i]}\n"); $part array(); :$pos file("part-of-speech.txt"); :foreach($pos as $line) { ::if (preg_match("/<[^\t]*)\t(.*)$/", $line, $parts $part[trim(strtolower($parts[1l))] $parts[2]; ::} :} :$infile implode("", file("sotu.txt")); :while ($infile) ( :if Sinfile, $matches >> { :echo nurble(Smatches[1] $matches[2]; :$infile trim( substr( $infile, strlen(Smatches[1])+strlen(Smatches[2]))); :function nurble( $what :global Spart; :$check -trim(strtolower($what)) :if (lisset($part[$check])) return "nurble"; 11 better to nurble unknown words :return (strpos(Spart[Scheck], "N")
Summary:
Please note that all contributions to SMBC Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
SMBC Wiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information