#this is for cases where the c-structures are already given in the
# elicitation files, such as
# ~/Avenue/Hebrew-MT/Data/Done/StructuralCorpus3-corrected.nodups.alon.et.txt

while(<>){
  chomp;
  if ($_ =~ /context:/){
    $C = $_;
    $C =~ s/context:\s*C-Structure:\s*//;
    if (($SL ne "")&&($TL ne "")&&($Al ne "")){
      print "SentenceIndex:\n";
      print "SL: $SL\n";
      print "TL: $TL\n";
      print "Alignment: $Al\n";
      print "Type: \n";
      print "CoEmbeddingScore: \n";
      print "C-Structure:$C\n";
      print "ConstSeq: \n";
      print "XSideConstraints: \n\n";
    }
    else{
      die ("Error in corpus:\nSL:$SL\nTL:$TL\n$Al:$AL\n$C-Structure:$C\n");
    }
    $SL = "";
    $TL = "";
    $Al = "";
    $C = "";
  }
  elsif ($_ =~ /srcsent:/){
    $SL = $_;
    $SL =~ s/srcsent:\s*//;
  }
  elsif ($_ =~ /tgtsent:/){
    $TL = $_;
    $TL =~ s/tgtsent:\s*//;
  }
  elsif ($_ =~ /aligned:/){
    $Al = $_;
    $Al =~ s/aligned:\s*//;
  }
}
