diff options
author | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-02-18 18:31:23 +0100 |
---|---|---|
committer | Patrick Simianer <simianer@cl.uni-heidelberg.de> | 2013-02-18 18:31:23 +0100 |
commit | 7deec52e8feb1c908a91224f308e8cbd9a170576 (patch) | |
tree | c8fb09523f5fef8873bd921da000d42ad5e59b6f /corpus/support/tokenizer.pl | |
parent | b89fd90083b22e6d4ab469af001a1f15fbcd7da9 (diff) | |
parent | c17d9c23d023a5c08656376944f636180f0a437b (diff) |
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'corpus/support/tokenizer.pl')
-rwxr-xr-x | corpus/support/tokenizer.pl | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/corpus/support/tokenizer.pl b/corpus/support/tokenizer.pl index e9c3a37d..0350a894 100755 --- a/corpus/support/tokenizer.pl +++ b/corpus/support/tokenizer.pl @@ -73,6 +73,7 @@ my $dict_file = "$workdir/token_list"; my $word_patt_file = "$workdir/token_patterns"; open(my $dict_fp, "$dict_file") or die; +binmode($dict_fp, ":utf8"); # read in the list of words that should not be segmented, ## e.g.,"I.B.M.", co-operation. @@ -89,6 +90,7 @@ while(<$dict_fp>){ } open(my $patt_fp, "$word_patt_file") or die; +binmode($patt_fp, ":utf8"); my @word_patts = (); my $word_patt_num = 0; while(<$patt_fp>){ @@ -147,7 +149,6 @@ while(<STDIN>){ print STDOUT " $new_line\n"; } -print STDERR "\n"; ######################################################################## |