Packages

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
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SearchTrie
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SearchTrie(vocabulary: Map[String, Int], edges: Map[(Int, Int), Int], nodes: Vector[(Int, Boolean, Int, Int)], caseSensitive: Boolean)

Value Members

  1. val caseSearch: (String) ⇒ Int
  2. val caseSensitive: Boolean
  3. val edges: Map[(Int, Int), Int]
  4. def isLeaf(nodeId: Int): Boolean
  5. def lastLeaf(nodeId: Int): Int
  6. def length(nodeId: Int): Int
  7. val nodes: Vector[(Int, Boolean, Int, Int)]
  8. def pi(nodeId: Int): Int
  9. 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)

  10. val vocabulary: Map[String, Int]