#!/usr/bin/perl


# ./ExtractSegmentation.pl < ../quechua2spa/lexicons/FreqWordList_00001-00100-irene-corr2.csv >! ../quechua2spa/lexicons/SegmentationGuide

# Fields in the CVS file are:
# 0.word, 1.stem+suffixes, 2.stem translation, 3.stem POS, 4.word transl, 5.word POS, (6.final stem translation, if there has been change of POS)...

sub setGlobals {
    @fields; # for each LexEntry
}
setGlobals();


while (<>){
    $line = $_;
#    $line =~ tr/A-Z/a-z/; # POS are in capitals
    @fields = split ",", $line; 

    $word = $fields[0];
    $segmentation = $fields[1];
    print STDOUT "$word   $segmentation\n";
}  






