class AhoCorasickAutomatonInternal extends Serializable
Aho-Corasick Algorithm: https://dl.acm.org/doi/10.1145/360825.360855 A simple, efficient algorithm to locate all occurrences of any of a finite number of keywords in a string of text. The algorithm consists of constructing a finite state pattern matching machine from the keywords and then using the pattern matching machine to process the text string in a single pass. The complexity of constructing a pattern matching machine and searching the text is linear to the total length of given patterns and the length of a text, respectively.
- Alphabetic
- By Inheritance
- AhoCorasickAutomatonInternal
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new AhoCorasickAutomatonInternal(alphabet: String, patterns: Array[EntityPattern], caseSensitive: Boolean = false)
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- var alphabet: String
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildAnnotation(chunk: ArrayBuffer[(Char, Int)], entity: String, id: String, sentence: Sentence, extraMetadata: Map[String, String] = Map.empty): Annotation
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- var nodeCount: Int
- var nodes: Array[Option[Node]]
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
searchPatternsInText(sentence: Sentence, extraMetadata: Map[String, String] = Map.empty): Seq[Annotation]
Second step of Aho-Corasick algorithm: The algorithm starts at the input text’s beginning and in the root state during searching for patterns.
Second step of Aho-Corasick algorithm: The algorithm starts at the input text’s beginning and in the root state during searching for patterns. It processes the input string in a single pass, and all occurrences of keywords are found, even if they overlap each other.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()