new-words
changeset 28:7db7bbf96fad
temporary files names
author | Igor Chubin <igor@chub.in> |
---|---|
date | Tue Jun 15 05:46:50 2010 +0300 (2010-06-15) |
parents | 0a80b2fa3ed8 |
children | c631833fa2be |
files | grep-sentences.pl new-words.sh |
line diff
1.1 --- a/grep-sentences.pl Fri May 21 19:53:24 2010 +0300 1.2 +++ b/grep-sentences.pl Tue Jun 15 05:46:50 2010 +0300 1.3 @@ -9,10 +9,14 @@ 1.4 $text=<PAGE>; 1.5 $text =~ s@http://[a-zA-Z&_.:/0-9%?=,\#+()\[\]~-]*@@g; 1.6 $text =~ s@\n@@g; 1.7 - $text =~ s@(Mr|Mrs)\.@\1POINT@g; 1.8 + $text =~ s@(Mr|Mrs|viz)\.@\1POINT@g; 1.9 + $text =~ s@e\.g\.@ePOINTgPOINT@g; 1.10 + $text =~ s@i\.e\.@iPOINTePOINT@g; 1.11 @sentences=split /[.!?]/, $text; 1.12 for (@sentences) { 1.13 - s@(Mr|Mrs)POINT@\1.@g; 1.14 + s@iPOINTePOINT@i\.e\.@g; 1.15 + s@ePOINTgPOINT@e\.g\.@g; 1.16 + s@(Mr|Mrs|viz)POINT@\1.@g; 1.17 s/^\s*//; 1.18 s/\s*$//; 1.19 s/\[[0-9]+\]//g;
2.1 --- a/new-words.sh Fri May 21 19:53:24 2010 +0300 2.2 +++ b/new-words.sh Tue Jun 15 05:46:50 2010 +0300 2.3 @@ -41,9 +41,9 @@ 2.4 fi 2.5 2.6 WORK_DIR=~/.new-words/ 2.7 -TEMP1=`mktemp /tmp/new-words-XXXXXXXXXX-temp1` 2.8 -TEMP2=`mktemp /tmp/new-words-XXXXXXXXXX-temp2` 2.9 -export ORIGINAL_TEXT=`mktemp /tmp/new-words-XXXXXXXXXX-orig` 2.10 +TEMP1=`mktemp /tmp/new-words-temp1.XXXXXXXXXX` 2.11 +TEMP2=`mktemp /tmp/new-words-temp2.XXXXXXXXXX` 2.12 +export ORIGINAL_TEXT=`mktemp /tmp/new-words-orig.XXXXXXXXXX` 2.13 editor=${EDITOR:-vim} 2.14 2.15 # language detection