Class

org.clulab.sequences

SeparatedLexiconNER

Related Doc: package sequences

Permalink

class SeparatedLexiconNER extends LexiconNER

Lexicon-based NER, which efficiently recognizes entities from large dictionaries

Note: This is a cleaned-up version of the old RuleNER. It may have been known simply as LexiconNER at one point, but was renamed to emphasize the fact that each KB is stored in a separate matcher (BooleanHashTrie). Other variations get by with fewer matchers.

Create a SeparatedLexiconNER object using either LexiconNER.apply() or SlowLexiconNERBuilder.build() rather than by the constructor if at all possible. Use it by calling the find() method on a single sentence.

Annotations
@SerialVersionUID()
Linear Supertypes
LexiconNER, Serializable, Serializable, Tagger[String], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SeparatedLexiconNER
  2. LexiconNER
  3. Serializable
  4. Serializable
  5. Tagger
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SeparatedLexiconNER(matchers: Array[BooleanHashTrie], knownCaseInsensitives: Set[String], useLemmas: Boolean, entityValidator: EntityValidator)

    Permalink

    matchers

    A map of tries to be matched for each given category label The order of the matchers is important: it indicates priority during ties (first has higher priority)

    knownCaseInsensitives

    Set of single-token entity names that can be spelled using lower case, according to the KB(s)

    useLemmas

    If true, tokens are matched using lemmas, otherwise using words Author: mihais Created: 5/11/15 Modified: 9/27/17 - Clean up from RuleNER into LexiconNER

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. val contentQualifiers: Array[(IndexedSeqView[String, Array[String]]) ⇒ Boolean]

    Permalink
    Definition Classes
    LexiconNER
  7. def contentfulSpan(sentence: Sentence, start: Int, length: Int): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    LexiconNER
  8. def countCharacters(wordsView: IndexedSeqView[String, Array[String]]): Int

    Permalink
    Definition Classes
    LexiconNER
  9. val entityValidator: EntityValidator

    Permalink
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def equalsForSerialization(other: AnyRef): Boolean

    Permalink

    The class is serializable and this method is used during testing to determine whether a reconstitued object is equal to the original without interfering with the operation of equals and getting into hash codes.

    The class is serializable and this method is used during testing to determine whether a reconstitued object is equal to the original without interfering with the operation of equals and getting into hash codes. Is is not necessary for this operation to be efficient or complete.

    other

    The object to compare to

    returns

    Whether this and other are equal, at least as far is serialization is concerned

    Definition Classes
    SeparatedLexiconNERLexiconNER
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def find(sentence: Sentence): Array[String]

    Permalink

    Matches the lexicons against this sentence

    Matches the lexicons against this sentence

    sentence

    The input sentence

    returns

    An array of BIO notations the store the outcome of the matches

    Definition Classes
    SeparatedLexiconNERLexiconNERTagger
  15. def findAt(tokens: Array[String], caseInsensitiveTokens: Array[String], offset: Int): (Int, Int)

    Permalink
    Attributes
    protected
  16. def findLongestMatch(sentence: Sentence): Array[String]

    Permalink

    Finds the longest match across all matchers.

    Finds the longest match across all matchers. This means that the longest match is always chosen, even if coming from a matcher with lower priority Only ties are disambiguated according to the order provided in the constructor

    Attributes
    protected
  17. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  18. def getLabels: Seq[String]

    Permalink
    Definition Classes
    SeparatedLexiconNERLexiconNER
  19. def getLemmas(sentence: Sentence): Array[String]

    Permalink
    Attributes
    protected
    Definition Classes
    LexiconNER
  20. val getTokens: (Sentence) ⇒ Array[String]

    Permalink
    Attributes
    protected
    Definition Classes
    LexiconNER
  21. def getWords(sentence: Sentence): Array[String]

    Permalink
    Attributes
    protected
    Definition Classes
    LexiconNER
  22. def hasCondition(wordsView: IndexedSeqView[String, Array[String]], condition: (Char) ⇒ Boolean): Boolean

    Permalink
    Definition Classes
    LexiconNER
  23. def hasDigit(wordsView: IndexedSeqView[String, Array[String]]): Boolean

    Permalink
    Definition Classes
    LexiconNER
  24. def hasLetter(wordsView: IndexedSeqView[String, Array[String]]): Boolean

    Permalink
    Definition Classes
    LexiconNER
  25. def hasSpace(wordsView: IndexedSeqView[String, Array[String]]): Boolean

    Permalink
    Definition Classes
    LexiconNER
  26. def hasUpperCaseLetters(wordsView: IndexedSeqView[String, Array[String]]): Boolean

    Permalink
    Definition Classes
    LexiconNER
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. val knownCaseInsensitives: Set[String]

    Permalink

    Words known to appear with and without capitalized letters which help determine whether a span of text is contentful

    Words known to appear with and without capitalized letters which help determine whether a span of text is contentful

    Definition Classes
    LexiconNER
  30. val matchers: Array[BooleanHashTrie]

    Permalink

    A map of tries to be matched for each given category label The order of the matchers is important: it indicates priority during ties (first has higher priority)

  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  33. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  35. def toString(stringBuilder: StringBuilder): Unit

    Permalink
  36. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  37. val useLemmas: Boolean

    Permalink

    If false, use the words of a sentence; if true, the lemmas

    If false, use the words of a sentence; if true, the lemmas

    Definition Classes
    LexiconNER
  38. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  39. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  40. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from LexiconNER

Inherited from Serializable

Inherited from Serializable

Inherited from Tagger[String]

Inherited from AnyRef

Inherited from Any

Ungrouped