# HG changeset patch # User Igor Chubin # Date 1276570010 -10800 # Node ID 7db7bbf96fade86ddec8d21e7cafb0d6465197b7 # Parent 0a80b2fa3ed8b7e951d9f32320a377f8f432e772 temporary files names diff -r 0a80b2fa3ed8 -r 7db7bbf96fad grep-sentences.pl --- a/grep-sentences.pl Fri May 21 19:53:24 2010 +0300 +++ b/grep-sentences.pl Tue Jun 15 05:46:50 2010 +0300 @@ -9,10 +9,14 @@ $text=; $text =~ s@http://[a-zA-Z&_.:/0-9%?=,\#+()\[\]~-]*@@g; $text =~ s@\n@@g; - $text =~ s@(Mr|Mrs)\.@\1POINT@g; + $text =~ s@(Mr|Mrs|viz)\.@\1POINT@g; + $text =~ s@e\.g\.@ePOINTgPOINT@g; + $text =~ s@i\.e\.@iPOINTePOINT@g; @sentences=split /[.!?]/, $text; for (@sentences) { - s@(Mr|Mrs)POINT@\1.@g; + s@iPOINTePOINT@i\.e\.@g; + s@ePOINTgPOINT@e\.g\.@g; + s@(Mr|Mrs|viz)POINT@\1.@g; s/^\s*//; s/\s*$//; s/\[[0-9]+\]//g; diff -r 0a80b2fa3ed8 -r 7db7bbf96fad new-words.sh --- a/new-words.sh Fri May 21 19:53:24 2010 +0300 +++ b/new-words.sh Tue Jun 15 05:46:50 2010 +0300 @@ -41,9 +41,9 @@ fi WORK_DIR=~/.new-words/ -TEMP1=`mktemp /tmp/new-words-XXXXXXXXXX-temp1` -TEMP2=`mktemp /tmp/new-words-XXXXXXXXXX-temp2` -export ORIGINAL_TEXT=`mktemp /tmp/new-words-XXXXXXXXXX-orig` +TEMP1=`mktemp /tmp/new-words-temp1.XXXXXXXXXX` +TEMP2=`mktemp /tmp/new-words-temp2.XXXXXXXXXX` +export ORIGINAL_TEXT=`mktemp /tmp/new-words-orig.XXXXXXXXXX` editor=${EDITOR:-vim} # language detection