From 834a89d96bba307d3e68a651760fa1aee44fe3fd Mon Sep 17 00:00:00 2001 From: Hieu Hoang Date: Fri, 24 Oct 2014 07:33:48 -0700 Subject: [PATCH] utf8 encoding /Tomas Fulajtar --- scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl b/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl index 13aa7f912f..38e3317373 100755 --- a/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl +++ b/scripts/training/wrappers/make-factor-brown-cluster-mkcls.perl @@ -34,6 +34,7 @@ sub read_cluster_from_mkcls { my ($file) = @_; my %CLUSTER; open(CLUSTER_FILE,$file) || die("ERROR: could not open cluster file '$file'"); + binmode(CLUSTER_FILE, ":utf8"); while() { chop; my ($word,$cluster) = split; @@ -45,3 +46,5 @@ sub read_cluster_from_mkcls { sub add_cluster_to_string { } + +