Help for this page

Select Code to Download


  1. or download this
    #SPLIT THE SENTENCES INTO TOKENS FOR INDIVIDUAL COMPARISON
    @tokens1 = split(/((?:<[^>]+>)+|(?:\s)+|(?:\w[A-Za-z'-]*\w*)+|(?:\W|\P
    +{IsWord})|(?:\p{IsDigit}))/, $line1);
    ...
            $line2 =~ s~\b($token)\b~<span class="m">$1</span>~gi;
        }}
    }
    
  2. or download this
    use Algorithm::NeedlemanWunsch;