From 2f76e751b42a64d4240086b00cce0e4a7c8ab06f Mon Sep 17 00:00:00 2001 From: Henry Whitney Date: Thu, 18 Jun 2020 17:44:16 -0400 Subject: [PATCH] work on tagged OGNT --- .../FilesForUpdates/Buld_MAST_OGNT_from_csv.pl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/MAST_tW_PDF_Updater/FilesForUpdates/Buld_MAST_OGNT_from_csv.pl b/MAST_tW_PDF_Updater/FilesForUpdates/Buld_MAST_OGNT_from_csv.pl index 408b8c6..ae03f32 100755 --- a/MAST_tW_PDF_Updater/FilesForUpdates/Buld_MAST_OGNT_from_csv.pl +++ b/MAST_tW_PDF_Updater/FilesForUpdates/Buld_MAST_OGNT_from_csv.pl @@ -7,7 +7,7 @@ use utf8; #use open IN => ":utf8", OUT => ":utf8"; use open IO => ":utf8"; binmode STDOUT, ":encoding(UTF-8)"; -mkdir "OGNT"; +mkdir "OGNT_for_tagging"; mkdir "Logs"; open LOG, ">Logs/log.log"; @@ -34,7 +34,7 @@ while () { Separate(); } -say OUT " \n \n \n"; +say OUT " \n \n \n \n"; say "Closing input and output files ..."; @@ -54,23 +54,23 @@ sub Separate { my ($this_bk) = ($bk{$bn}); $bklc = lc $bk{$bn}; if (OUT-> opened()) { - say OUT " \n \n \n"; + say OUT " \n \n \n \n"; close OUT; } - open OUT, ">:utf8", "OGNT/$bn-$bk{$bn}.xml" or die "$! $bn-$bk{$bn}.xml"; - say OUT "\n\n
\n \n "; + open OUT, ">:utf8", "OGNT_for_tagging/$bn-$bk{$bn}.xml" or die "$! $bn-$bk{$bn}.xml"; + say OUT "\n\n \n
\n \n "; ($last_bn, $last_ch, $last_vs) = ($bn, $ch, $vs) } elsif ($ch ne $last_ch) { - say OUT " \n \n \n "; + say OUT " \n \n \n "; ($last_ch, $last_vs) = ($ch, $vs) } elsif ($vs ne $last_vs) { my ($this_bk, $bklc) = ($bk{$bn}, lc $bk{$bn}); - say OUT " \n "; + say OUT " \n "; $last_vs = $vs; } - say OUT "\t\t\t\t\"lemma=\"$sn\" morph=\"$gram\" lexeme=\"$lexeme\">$word" + say OUT "\t\t\t\t\t\"lemma=\"G$sn\" morph=\"$gram\" lexeme=\"$lexeme\">$word" } }