edu.arizona.sista.reach.grounding

InMemoryKB

Related Doc: package grounding

class InMemoryKB extends Speciated with ReachKBKeyTransforms

Class implementing an in-memory knowledge base indexed by key and species. Written by: Tom Hicks. 10/25/2015. Last Modified: Add default sort-by-human for resolutions returned from IMKB.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. InMemoryKB
  2. ReachKBKeyTransforms
  3. KBKeyTransforms
  4. Speciated
  5. AnyRef
  6. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new InMemoryKB(namespace: String, hasSpeciesInfo: Boolean, metaInfo: IMKBMetaInfo)

    Additional constructor to add namespace to meta information for reference.

  2. new InMemoryKB(hasSpeciesInfo: Boolean = false, metaInfo: IMKBMetaInfo = new IMKBMetaInfo())

Type Members

  1. type KeyTransforms = Seq[(String) ⇒ String]

    Type alias for functions which take a text string and return a potential key string.

    Type alias for functions which take a text string and return a potential key string.

    Definition Classes
    KBKeyTransforms
  2. type SpeciesNameSet = Set[String]

    Species name sets.

    Species name sets.

    Definition Classes
    Speciated

Value Members

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

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

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

    Definition Classes
    AnyRef → Any
  4. def SpeciesNameSet(xs: String*): Set[String]

    Definition Classes
    Speciated
  5. def addEntry(entry: KBEntry): HashMap[String, Set[KBEntry]] with MultiMap[String, KBEntry]

    Add the given entry to this KB, if it is unique.

  6. def applyTransforms(text: String, transformFns: KeyTransforms): Seq[String]

    Return a sequence of alternate keys, one for each of the given key transforms.

    Return a sequence of alternate keys, one for each of the given key transforms.

    Definition Classes
    KBKeyTransforms
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def containsHumanNsId(nsIdSeq: Seq[String]): Boolean

    Tell whether the given sequence of namespace/ID strings contains a human nsId.

    Tell whether the given sequence of namespace/ID strings contains a human nsId.

    Definition Classes
    Speciated
  10. def containsHumanSpecies(speciesSeq: Seq[String]): Boolean

    Tell whether the given sequence of species strings contain a human species label.

    Tell whether the given sequence of species strings contain a human species label.

    Definition Classes
    Speciated
  11. def entries: Seq[KBEntry]

    Return an sequence over the entries in this KB.

  12. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  16. def hasHumanNsId(nsId: String): Boolean

    Tell whether the given namespace/ID string is an ID for humans or not.

    Tell whether the given namespace/ID string is an ID for humans or not.

    Definition Classes
    Speciated
  17. val hasSpeciesInfo: Boolean

  18. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  19. def hyphenatedProteinKey(text: String): String

    Check for one of several types of hyphen-separated strings and, if found, extract and return the candidate text portion, else return the text unchanged.

    Check for one of several types of hyphen-separated strings and, if found, extract and return the candidate text portion, else return the text unchanged.

    Definition Classes
    ReachKBKeyTransforms
  20. def isHumanSpecies(species: String): Boolean

    Tell whether the given species string is label for humans or not.

    Tell whether the given species string is label for humans or not.

    Definition Classes
    Speciated
  21. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  22. def isMemberOf(species: String, speciesSet: SpeciesNameSet): Boolean

    Tell whether the given species string is a member of the given set of species.

    Tell whether the given species string is a member of the given set of species.

    Definition Classes
    Speciated
  23. def lookupAll(key: String): Resolutions

    Return resolutions for the set of all KB entries for the given key.

  24. def lookupByASpecies(key: String, species: String): Resolutions

    Find the set of KB entries, for the given key, which match the given single species.

    Find the set of KB entries, for the given key, which match the given single species. Returns resolutions for matching entries or None.

  25. def lookupBySpecies(key: String, speciesSet: SpeciesNameSet): Resolutions

    Finds the set of KB entries, for the given key, which contains a species in the given set of species.

    Finds the set of KB entries, for the given key, which contains a species in the given set of species. Returns resolutions for matching entries or None.

  26. def lookupHuman(key: String): Resolutions

    Finds the set of KB entries, for the given key, which have humans as the species.

    Finds the set of KB entries, for the given key, which have humans as the species. Returns resolutions for matching entries or None.

  27. def lookupNoSpecies(key: String): Resolutions

    Find the set of KB entries, for the given key, which do not contain a species.

    Find the set of KB entries, for the given key, which do not contain a species. Returns resolutions for matching entries or None.

  28. def lookupsAll(allKeys: Seq[String]): Resolutions

    Try lookups for all given keys until one succeeds or all fail.

  29. def lookupsByASpecies(allKeys: Seq[String], species: String): Resolutions

    Try lookups for all given keys until one succeeds or all fail.

  30. def lookupsBySpecies(allKeys: Seq[String], speciesSet: SpeciesNameSet): Resolutions

    Try lookups for all given keys until one succeeds or all fail.

  31. def lookupsHuman(allKeys: Seq[String]): Resolutions

    Try lookups for all given keys until one succeeds or all fail.

  32. def lookupsNoSpecies(allKeys: Seq[String]): Resolutions

    Try lookups for all given keys until one succeeds or all fail.

  33. def makeCanonicalKey(text: String): String

    Canonicalize the given text string into a key for both storage and lookup.

    Canonicalize the given text string into a key for both storage and lookup.

    Definition Classes
    ReachKBKeyTransforms
  34. def makeResolution(entry: Option[KBEntry]): Option[KBResolution]

    Wrap the given optional KB entry in a new singleton-sequence of resolutions formed from this KB and the given KB entry.

  35. val metaInfo: IMKBMetaInfo

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

    Definition Classes
    AnyRef
  37. def newResolution(entry: KBEntry): KBResolution

    Wrap the given KB entry in a new KB resolution formed from this KB and the given KB entry.

  38. def newResolutions(entries: Option[Seq[KBEntry]]): Resolutions

    Wrap the given sequence of KB entries in a sequence of resolutions formed from this KB and the given KB entries.

  39. final def notify(): Unit

    Definition Classes
    AnyRef
  40. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  41. def reachAlternateKeys(text: String, transformFns: KeyTransforms): Seq[String]

    Return alternate lookup keys created from the given text string and transform functions.

    Return alternate lookup keys created from the given text string and transform functions.

    Definition Classes
    ReachKBKeyTransforms
  42. def stripFamilySuffixes(text: String): String

    Return the portion of the text string minus one of the protein family suffixes, if found in the given text string, else return the text lowercased.

    Return the portion of the text string minus one of the protein family suffixes, if found in the given text string, else return the text lowercased.

    Definition Classes
    ReachKBKeyTransforms
  43. def stripMutantProtein(text: String): String

    Return the portion of the text string before a trailing mutation phrase, if found in the given text string, else return the text unchanged.

    Return the portion of the text string before a trailing mutation phrase, if found in the given text string, else return the text unchanged.

    Definition Classes
    ReachKBKeyTransforms
  44. def stripOrganCellTypeSuffixes(text: String): String

    Return the portion of the text string minus one of the organ-cell-type suffixes, if found in the given text string, else return the text unchanged.

    Return the portion of the text string minus one of the organ-cell-type suffixes, if found in the given text string, else return the text unchanged.

    Definition Classes
    ReachKBKeyTransforms
  45. def stripPTMPrefixes(text: String): String

    Return the portion of the text string minus any of the PTM-related prefixes, if found in the given text string, else return the text unchanged.

    Return the portion of the text string minus any of the PTM-related prefixes, if found in the given text string, else return the text unchanged.

    Definition Classes
    ReachKBKeyTransforms
  46. def stripProteinSuffixes(text: String): String

    Return the portion of the text string minus one of the protein suffixes, if found in the given text string, else return the text lowercased.

    Return the portion of the text string minus one of the protein suffixes, if found in the given text string, else return the text lowercased.

    Definition Classes
    ReachKBKeyTransforms
  47. def stripSuffixes(suffixes: Seq[String], text: String): String

    Try to remove all of the suffixes in the given set from the given text.

    Try to remove all of the suffixes in the given set from the given text.

    Definition Classes
    KBKeyTransforms
  48. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  49. val theKB: HashMap[String, Set[KBEntry]] with MultiMap[String, KBEntry]

    The root data structure implementing this in-memory knowledge base.

  50. def toResolutions(entry: KBEntry): Resolutions

    Wrap the given KB entry in a new singleton-sequence of resolutions formed from this KB and the given KB entry.

  51. def toString(): String

    Definition Classes
    AnyRef → Any
  52. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ReachKBKeyTransforms

Inherited from KBKeyTransforms

Inherited from Speciated

Inherited from AnyRef

Inherited from Any

Ungrouped