Skip to content

Releases: robert-bor/aho-corasick

Update build to support JDK 15

10 Nov 03:51
Compare
Choose a tag to compare

Changes:

  • Add Maven Central repository to build file
  • Update JUnit to 4.13.1
  • Update Jacoco to 0.8.6 (introduces some JDK 15 support)
  • Update Sonatype plugin to 1.6.8
  • Update Maven compiler plugin to 3.8.1
  • Update Maven Javadoc plugin to 3.2.0
  • Update Maven source plugin to 3.0.1
  • Remove junit-dep (was rolled into junit)
  • Add Apache 2.0 License file

Support unicode characters

25 Sep 01:22
Compare
Choose a tag to compare

Changes:

  • Fix unicode character issues
  • Migrate to Java 8
  • Fix IDE warnings
  • Update version number to 0.6.1

Fix NullPointerException with firstMatch

16 Nov 22:09
0703e4b
Compare
Choose a tag to compare

Changes include:

  • When a PayloadTrie has no match, a call to firstMatch would trigger a NullPointerException. This change has firstMatch return null rather than throwing an uncaught exception.

  • Increased version number to 0.6.0 within pom.xml and the README file.

Allow Payload with Keyword

22 Aug 04:25
Compare
Choose a tag to compare
  • Allow Payload with Keyword (issue #49). Tries are now genericized, allowing a payload to be associated. The old contract of Emits and Tries is respected. Thanks to @danbeck for the PR request, which includes extensive changes to the code base and documentation.

Allow to ack emits

15 May 19:04
d45c2ee
Compare
Choose a tag to compare
  • Allow to ack emits (issue #53 / #55); implementing the interface StatefulEmitHandler (or AbstractStatefulDefaultHandler) now opens up the methods isOnlyWholeWords , isOnlyWholeWordsWhiteSpaceSeparated and isAllowOverlaps on using an emit handler. Thanks to @Crystark for the PR and @DaveJarvis for the discussion.

Construct > Use

23 Sep 06:25
Compare
Choose a tag to compare

NOTE: contains API breaking changes!

Note that the API has changed! You must now use the following to construct a Trie:

        Trie trie = Trie.builder()
                .onlyWholeWords()
                .addKeyword("sugar")
                .build();
  • Custom EmitHandler (issue #23)
    It is possible to add your own EmitHandler on the lowest level of the algorithm (ie, the pure Aho-Corasick algorithm). Every emit will be pushed to your handler, meaning no internal collection will be constructed. (thanks to @burtonator)
  • Whole words including whitespace (issue #17)
    Previously it was not possible to select for whole words including whitespaces. With this update, you can remove all matches which are not whole keywords including whitespaces. Just set onlyWholeWordsWhiteSpaceSeparated() on the builder. (thanks to @cteyton)
  • containsMatch and firstMatch (pull #14)
    You can ask the Trie whether it contains any of the keywords, by calling containsMatch. You can also ask the Trie to return its firstMatch and then stop processing. (thanks to @rripken)
  • Case insensitivity extends to keywords (issue #12)
    Setting the Trie to be case insensitive extends to the addition of keywords, which are lower-cased before being added to the Trie. (thanks to @dlutz2 and @yim1990)
  • Document reference (pull #18)
    The reference to the PDF points to an existing document. This document is the basis for this humble library which but stands on the shoulders of giants. Be sure to read it if you want to understand the algorithm. (thanks to @SubOptimal)