case class SearchTrie(vocabulary: Map[String, Int], edges: Map[(Int, Int), Int], nodes: Vector[(Int, Boolean, Int, Int)], caseSensitive: Boolean) extends Product with Serializable
Immutable Collection that used for fast substring search Implementation of Aho-Corasick algorithm https://en.wikipedia.org/wiki/Aho%E2%80%93Corasick_algorithm
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- SearchTrie
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
Value Members
- val caseSearch: (String) ⇒ Int
- val caseSensitive: Boolean
- val edges: Map[(Int, Int), Int]
- def isLeaf(nodeId: Int): Boolean
- def lastLeaf(nodeId: Int): Int
- def length(nodeId: Int): Int
- val nodes: Vector[(Int, Boolean, Int, Int)]
- def pi(nodeId: Int): Int
-
def
search(text: Seq[String]): Seq[(Int, Int)]
Searchs phrases in the text
Searchs phrases in the text
- text
test to search in
- returns
Iterator with pairs of (begin, end)
- val vocabulary: Map[String, Int]