Commit d254c088 authored by 安岡孝一's avatar 安岡孝一
Browse files

makecorpus.sh

parent 966603e5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
     if [ ! -s $G ]
     then sed -e 's/[/\[/g' -e 's/]/\]/g' -e 's/\[[^]]*\]//g' -e 's/(/(/g' -e 's/)/)/g' -e 's/([^)]*)//g' `ls -1t incoming/*/[th]*/$B.utf-8 | head -1` | tr '() \133\135' '\012\012\012\012\012' > $G
     elif [ $D/hakubun/$B.utf-8 -nt $G ]
     then ( sed -e 's/[/\[/g' -e 's/]/\]/g' -e 's/\[[^]]*\]//g' -e 's/(/(/g' -e 's/)/)/g' -e 's/([^)]*)//g' $D/hakubun/$B.utf-8 | tr '()\133\135' '\012\012\012\012' ; echo '' ) | tr -s '\012' '\012' > $G.a~
     then ( sed -e 's/[/\[/g' -e 's/]/\]/g' -e 's/\[[^]]*\]//g' -e 's/(/(/g' -e 's/)/)/g' -e 's/([^)]*)//g' $D/hakubun/$B.utf-8 | tr '() \133\135' '\012\012\012\012\012' ; echo '' ) | tr -s '\012' '\012' > $G.a~
          sed -n -e '/	/{' -e :loop -e N -e 's/	.*\n//' -e 's/EOS//' -e '/	/bloop' -e p -e '}' $G | tr -s '\012' '\012' > $G.b~
          X=`diff $G.a~ $G.b~ | sed -n -e 's/^\([0-9]*\).*$/\1/p' -e 1q`
          if [ 0$X -gt 0 ]