#!/usr/bin/perl -w

# Minimalistic perl script to move from risten input to 
# xml output.
# Using twig or something advanced would clearly be better.
# On the other hand side, this works.
# Well, what twig etc gives is contitionality. Here there is one input only.

use encoding 'utf-8';

while ($line = <> ) {
    chomp $line;
    ($sme,
     $infl,
     $nob,
     $smeex,
     $nobex,
     $smeex2,
     $nobex2)
	= split /\t/, $line ;
#    print "samisk: $sme\n";
#    print "pos: $smepos\n";
    print "  <e>\n    <lg>\n      <l pos=\"\">$sme</l>\n      <lc>$infl</lc>\n    </lg>\n    <mg>\n      <tg>\n        <t pos=\"\">$nob</t>\n        <xg>\n          <x>$smeex</x>\n          <xt>$nobex</xt>\n        </xg>\n        <xg>\n          <x>$smeex2</x>\n          <xt>$nobex2</xt>\n        </xg>\n      </tg>\n    </mg>\n  </e>\n\n" ;

}
