[90494] trunk/dports/textproc/extractopinion

hum at macports.org hum at macports.org
Wed Mar 7 07:40:01 PST 2012


Revision: 90494
          http://trac.macports.org/changeset/90494
Author:   hum at macports.org
Date:     2012-03-07 07:40:01 -0800 (Wed, 07 Mar 2012)
Log Message:
-----------
extractopinion: update to 1.2; fix dependencies; add patch-lib_tsv.pm.diff to use juman6 and knp3 instead of juman and knp.

Modified Paths:
--------------
    trunk/dports/textproc/extractopinion/Portfile
    trunk/dports/textproc/extractopinion/files/patch-crftrain.sh.diff
    trunk/dports/textproc/extractopinion/files/patch-extract.sh.diff
    trunk/dports/textproc/extractopinion/files/patch-makemdl.sh.diff

Added Paths:
-----------
    trunk/dports/textproc/extractopinion/files/patch-lib_tsv.pm.diff

Modified: trunk/dports/textproc/extractopinion/Portfile
===================================================================
--- trunk/dports/textproc/extractopinion/Portfile	2012-03-07 15:32:26 UTC (rev 90493)
+++ trunk/dports/textproc/extractopinion/Portfile	2012-03-07 15:40:01 UTC (rev 90494)
@@ -4,7 +4,7 @@
 PortSystem          1.0
 
 name                extractopinion
-version             1.1
+version             1.2
 categories          textproc japanese
 platforms           darwin
 maintainers         hum openmaintainer
@@ -15,20 +15,20 @@
 long_description    ${name} is ${description}.
 
 master_sites        http://alaginrc.nict.go.jp/opinion/src/
+checksums           rmd160  abbfb97605e4316349f279332d3785af3c39d9a0 \
+                    sha256  09c0a2ca339bc5b50afccecbf0b130aec9d15445155ee36fa6605a02952db3cb
 
-checksums           rmd160  45a35364e5354ee115c5d8a1481809d4cd408390 \
-                    sha256  e940860a719be12c64a0cd573bf8ef1922210690df33c7ca5695097e2f5510fc
-
 patchfiles          patch-extract.sh.diff \
                     patch-makemdl.sh.diff \
-                    patch-crftrain.sh.diff
+                    patch-crftrain.sh.diff \
+                    patch-lib_tsv.pm.diff
 
 depends_lib         port:crfpp \
-                    port:nkf \
+                    port:libiconv \
                     port:gawk \
                     port:p5-text-csv_xs \
-                    port:juman \
-                    port:knp
+                    port:juman6 \
+                    port:knp3
 
 use_configure       no
 

Modified: trunk/dports/textproc/extractopinion/files/patch-crftrain.sh.diff
===================================================================
--- trunk/dports/textproc/extractopinion/files/patch-crftrain.sh.diff	2012-03-07 15:32:26 UTC (rev 90493)
+++ trunk/dports/textproc/extractopinion/files/patch-crftrain.sh.diff	2012-03-07 15:40:01 UTC (rev 90494)
@@ -1,10 +1,10 @@
---- src/crftrain.sh.orig	2011-09-21 11:51:17.000000000 +0900
-+++ src/crftrain.sh	2011-10-07 22:00:32.000000000 +0900
-@@ -16,6 +16,6 @@
+--- src/crftrain.sh.orig	2012-03-01 09:38:37.000000000 +0900
++++ src/crftrain.sh	2012-03-07 01:36:37.000000000 +0900
+@@ -21,6 +21,6 @@
  tagfile=$tmp/crftrain.$$.tag
  
  $dir/tsv2tag.awk -f $exlib/utility.awk -v SCRIPT=$dir/tsv2tag.awk > $tagfile
--$crf_learn -c $param_c $dir/template $tagfile $mdlfile
-+$crf_learn -c $param_c $dir/../xpr/template $tagfile $mdlfile
+-$crf_learn -c $param_c -p $param_p $dir/template $tagfile $mdlfile
++$crf_learn -c $param_c -p $param_p $dir/../xpr/template $tagfile $mdlfile
  
  rm -f $tagfile

Modified: trunk/dports/textproc/extractopinion/files/patch-extract.sh.diff
===================================================================
--- trunk/dports/textproc/extractopinion/files/patch-extract.sh.diff	2012-03-07 15:32:26 UTC (rev 90493)
+++ trunk/dports/textproc/extractopinion/files/patch-extract.sh.diff	2012-03-07 15:40:01 UTC (rev 90494)
@@ -1,18 +1,6 @@
---- extract.sh.orig	2011-09-21 11:51:06.000000000 +0900
-+++ extract.sh	2011-10-07 23:24:41.000000000 +0900
-@@ -1,11 +1,5 @@
- #!/bin/sh
- 
--if [ $# -lt 1 -o  $# -gt 3  ]
--then
--    echo "Usage $0 file_name [topic_str]"
--    exit -1;
--fi
--
- dir=`cd $(dirname $0) && pwd`
- . $dir/conf.sh
- 
-@@ -13,10 +7,31 @@
+--- extract.sh.orig	2012-03-01 09:38:37.000000000 +0900
++++ extract.sh	2012-03-07 01:30:02.000000000 +0900
+@@ -20,13 +20,35 @@
  export EXOPLIB=$dir/lib
  export EXOPDIC=$dir/dic
  
@@ -39,9 +27,14 @@
 +
  tmp=${TMPDIR:-.}
  tsvfile=$tmp/extract.$$.tsv
++euc_file=$tmp/extract.$$.euc
  
--perl -I $EXOPLIB $EXOPLIB/in2tsv.pl $1 $2 > $tsvfile
-+perl -I $EXOPLIB $EXOPLIB/in2tsv.pl $file_name $topic_str > $tsvfile
+ #nkf -e -W --fb-skip < $1 > $1.euc
+ # $B;XDjJ8;z%3!<%I$O4D6-$K$h$C$FI=5-$,0c$&$?$a(Biconv -l$B$G3NG'(B
+-iconv -c -f UTF-8 -t EUC-JP < $1 > $1.euc
+-perl -I $EXOPLIB $EXOPLIB/in2tsv.pl $1.euc $2 > $tsvfile
++iconv -c -f UTF-8 -t EUC-JP < $file_name > $euc_file
++perl -I $EXOPLIB $EXOPLIB/in2tsv.pl $euc_file $topic_str > $tsvfile
  $dir/_extract.sh $model $tsvfile | perl -I $EXOPLIB $EXOPLIB/tsv2out.pl
  
  rm -f $tsvfile

Added: trunk/dports/textproc/extractopinion/files/patch-lib_tsv.pm.diff
===================================================================
--- trunk/dports/textproc/extractopinion/files/patch-lib_tsv.pm.diff	                        (rev 0)
+++ trunk/dports/textproc/extractopinion/files/patch-lib_tsv.pm.diff	2012-03-07 15:40:01 UTC (rev 90494)
@@ -0,0 +1,11 @@
+--- lib/tsv.pm.orig	2012-03-01 09:38:37.000000000 +0900
++++ lib/tsv.pm	2012-03-07 01:40:10.000000000 +0900
+@@ -11,7 +11,7 @@
+ use utf8;
+ binmode STDOUT, ":encoding(utf8)";
+ 
+-my $knpcmd = "echo %s | juman -B | knp -dpnd -tab -postprocess";
++my $knpcmd = "echo %s | juman6 -B | knp3 -dpnd -tab -postprocess";
+ 
+ sub new ($$) {
+     my ( $class, $self ) = @_;

Modified: trunk/dports/textproc/extractopinion/files/patch-makemdl.sh.diff
===================================================================
--- trunk/dports/textproc/extractopinion/files/patch-makemdl.sh.diff	2012-03-07 15:32:26 UTC (rev 90493)
+++ trunk/dports/textproc/extractopinion/files/patch-makemdl.sh.diff	2012-03-07 15:40:01 UTC (rev 90494)
@@ -1,7 +1,13 @@
---- makemdl.sh.orig	2011-10-03 22:18:53.000000000 +0900
-+++ makemdl.sh	2011-10-07 23:24:50.000000000 +0900
-@@ -9,13 +9,42 @@
+--- makemdl.sh.orig	2012-03-01 09:38:37.000000000 +0900
++++ makemdl.sh	2012-03-07 01:36:42.000000000 +0900
+@@ -6,19 +6,48 @@
  
+ export LANG=C
+ 
+ dir=`cd $(dirname $0) && pwd`
+ 
+ . $dir/conf.sh
+ 
  export EXOPLIB=$dir/lib
  
 -cat $dir/makemodel/tsv/*.tsv > $dir/makemodel/data.tsv
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120307/c3bdced4/attachment.html>


More information about the macports-changes mailing list