Example #1
0
 private Match FindMatch(int startInOld, int endInOld, int startInNew, int endInNew)
 {
     // For large texts it is more likely that there is a Match of size bigger than maximum granularity.
     // If not then go down and try to find it with smaller granularity.
     for (int i = _matchGranularity; i > 0; i--)
     {
         var options = new MatchOptions
         {
             BlockSize = i,
             RepeatingWordsAccuracy      = RepeatingWordsAccuracy,
             IgnoreWhitespaceDifferences = IgnoreWhitespaceDifferences
         };
         var finder = new MatchFinder(_oldWords, _newWords, startInOld, endInOld, startInNew, endInNew, options);
         var match  = finder.FindMatch();
         if (match != null)
         {
             return(match);
         }
     }
     return(null);
 }
Example #2
0
 private Match FindMatch(int startInOld, int endInOld, int startInNew, int endInNew)
 {
     // For large texts it is more likely that there is a Match of size bigger than maximum granularity.
     // If not then go down and try to find it with smaller granularity.
     for (int i = _matchGranularity; i > 0 ; i--)
     {
         var options = new MatchOptions
         {
             BlockSize = i,
             RepeatingWordsAccuracy = RepeatingWordsAccuracy,
             IgnoreWhitespaceDifferences = IgnoreWhitespaceDifferences
         };
         var finder = new MatchFinder(_oldWords, _newWords, startInOld, endInOld, startInNew, endInNew, options);
         var match = finder.FindMatch();
         if (match != null)
             return match;
     }
     return null;
 }
Example #3
0
 private Match FindMatch(int startInOld, int endInOld, int startInNew, int endInNew)
 {
     // For large texts it is more likely that there is a Match of size bigger than maximum granularity.
     // If not then go down and try to find it with smaller granularity.
     for (int i = _matchGranularity; i > 0 ; i--)
     {
         var finder = new MatchFinder(i, _oldWords, _newWords, startInOld, endInOld, startInNew, endInNew);
         var match = finder.FindMatch();
         if (match != null)
             return match;
     }
     return null;
 }