Help for this page

Select Code to Download


  1. or download this
    my %pairs = ();
    foreach my $tag_sequence (@sequences) {
      push(@{$pairs}{$tag_sequence}, $sentence);
    }
    
  2. or download this
    while (my $rule = chomp(<in>) {
      my $sentences = $pairs{$rule};
      # Do what you want with the data returned
    }