aho_corasick 1.1.0 copy "aho_corasick: ^1.1.0" to clipboard
aho_corasick: ^1.1.0 copied to clipboard

outdated

Pattern Matching implementation of aho_corasick using a state machine to find all matches in a text for a large number of words.

example/aho_corasick_example.dart

import 'package:aho_corasick/aho_corasick.dart';

main() {
  final aho = AhoCorasick.fromWordList(['abc', 'bcd', 'bcde']);
  final results = aho.matches('search in abcd');
  print(results
      .map((match) => 'found ${match.word} at ${match.startIndex}')
      .join('\n'));

  final longest = aho.firstMatch('bcde', longest: true);
  print(longest.word);
}
4
likes
40
pub points
57%
popularity

Publisher

unverified uploader

Pattern Matching implementation of aho_corasick using a state machine to find all matches in a text for a large number of words.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (LICENSE)

Dependencies

meta

More

Packages that depend on aho_corasick