Skip to content

yizhiru/scala-AC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Scala implementation of Aho-Corasick algorithm

This is a simple implementation of Aho-Corasick algorithm written in purely scala, which is byte-oriented. The best feature is that it supports adding the property of word.

Usage

// create AC automaton
val ac = new Automaton
// "user defined" is the property of words
ac.addWords("user defined", "he", "she", "his", "hers")
ac.setFailTransitions()

// search pattern string
val results = ac.search("ushers")

About

Scala implementation of Aho-Corasick algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages