John Gilmore <gnu@toad.com> writes: We received the transcript of October 20's oral hearing from the court stenographer. It's up on the EFF Web site at:
http://www.eff.org/pub/Legal/Cases/Bernstein_v_DoS/Legal/951020_hearing.tran...
I find it hard to read things in all upper case. Here's a slowish 95% hack to make it more legible. I imagine there's a 5-line way to do it twenty times faster for 99% success, but what the heck... Jim Gillogly Highday, 12 Blotmath S.R. 1995, 19:47 ----------------------------------------------------------------------- #!/usr/bin/perl # delegal: quick-n-dirty case conversion for Bernstein transcript # 2 Nov 95, Gillogly @propers = ( "daniel", "dan", "marilyn", "hall", "patel", "california", "bernstein", "united", "department", "state", "cohn", "coppolino", "national", "security", "agency", "steefel", "levitt", "weiss", "court", "i", "mc", "glashan", "sarrall", "lee", "tien", "ed", "ross", "susan", "arnold", "justice", "anthony", "mandel", "bazarov", "appeals", "helme", "webster", "states", "dorfmont", "constitution", "constitutional", "doe", "schechter", "snuffle", "june", "lowell", "cj", "edler", "olc", "mr", "ninth", "circuit", "judge", "ritchie", "english", "dr", "freedman", "o", "brien", "pentagon", "cubby", "compuserve", "golden", "gate", "san", "francisco", ); $INDENT_UPALL = 13; # If indented deeper than this, upcase each word $INDENT_UPCOLON = 6; # If indented with a colon and these spaces, upcase $INDENT_PARA = 10; # If indented this deep, upcase first word $INDENT_SENT = 2; # Pick up sentence starts while ($proper = pop(@propers)) { ($first, $rest) = ($proper =~ /^(.)(.*)$/); $first =~ tr/a-z/A-Z/; $caps{$proper} = $first . $rest; } while (<>) { tr/A-Z/a-z/; # Downcase everything s/u\.s\./U.S./g; # special case s/d\.c\./D.C./g; # special case s/([^a-z])nsa([^a-z])/$1NSA$2/g; # Another one s/([^a-z])itar([^a-z])/$1ITAR$2/g; # Another one # Upcase known proper names while (($proper, $cap) = each(%caps)) { ($first, $rest) = ($proper =~ /^(.)(.*)$/); s/([^a-z])$proper([^a-z])/$1$cap$2/g; } # If it's indented deeply, upcase each word if (/ {$INDENT_UPALL}/ || /: {$INDENT_UPCOLON}/) { while (($low) = /[^a-zA-Z]([a-z])/) { $low =~ tr/a-z/A-Z/; s/([^a-zA-Z])[a-z]/$1$low/; } } # Upcase middle initials while (($init) = / ([a-z])\./) { $init =~ tr/a-z/A-Z/; s/ [a-z]\./ $init\./; } # Upcase paragraphs if (($init) = / {$INDENT_PARA}([a-z])/) { $init =~ tr/a-z/A-Z/; s/( {$INDENT_PARA})[a-z]/$1$init/; } # Sentences ($num, $_) = /^([ \d]*)([^ \d].*)$/; # Simplify while (($init) = /[^ ] {$INDENT_SENT}([a-z])/) { $init =~ tr/a-z/A-Z/; s/( {$INDENT_SENT})[a-z]/$1$init/; } $_ = $num . $_ . "\n"; print $_; } -----------------------------------------------------------------------