Skip to content
Mihai Surdeanu edited this page Feb 3, 2016 · 1 revision

current actions

EntityEngine

Actions:

  • default
    • converts mentions to biomentions
  • mkEntities
    • gets RelationMentions and decomposes the arguments into Seq[TextBoundMention]
    • converts results to BioMentions
    • deletes any other kind of mention
  • mkNERMentions
    • filters out mentions that overlap any preexisting Mention
    • converts results to BioMentions

ModificationEngine

Actions:

  • default
    • converts mentions to biomentions
  • mkEntities
    • gets RelationMentions and decomposes the arguments into Seq[TextBoundMention]
    • converts results to BioMentions
    • deletes any other kind of mention
  • mkModTrigger
    • takes a mention with args (relation or event) and replaces it with its first arg named "mod" as a TextBoundMention
    • converts results to BioMention
    • NOTE this can be simplified by using Rules with lookarounds (i.e. modification_trigger_1 can use nested lookaheads)
  • mkModification
    • partial function; only gets RelationMentions with label PTM or Mutant
    • if PTM:
      • converts first relation("entity") into BioMention
      • retrieves optional first relation("site")
      • retrieves first relation("mod")
      • assigns label from mod
      • if label is not unknown then add PTM modification to entity
      • outputs entity
    • if Mutant:
      • converts first relation("mutated") into BioMention
      • retrieves first relation("evidence")
      • add Mutation modification to mutated
      • outputs mutated
  • storeEventSite
    • gets mention with arguments
    • retrieves first entity from mention and converts to BioMention
    • retrieves first site from mention
    • finds token interval from (entity, site)
    • finds all sites withing interval that are already in the state
    • attaches found sites as EventSite modifications to entity
    • NOTE original site is included in found sites
  • storeMutants
    • gets mention with arguments
    • retrieves first entity from mention and converts to BioMention
    • retrieves first mutant from mention
    • finds token interval from (entity, mutant)
    • finds all mutants withing interval that are already in the state
    • attaches found sites as Mutant modifications to entity
    • NOTE original mutant is included in found mutants

EventEngine

Actions:

  • default
    • converts mentions to biomentions
  • mkUbiquitination
    • filters mentions with argument that contains text "ubiq"
    • converts mentions to BioMentions
  • mkRegulation
    • sort mentions so that mentions with a controller event appear first
      • this is done so that when overlapping mentions are found, the ones with event controllers are preferred
    • flip mention label if needed
    • remove dummy arg if needed
    • get controller if available (controlled is required but controller is optional)
    • if controller is BioChemicalEntity return regulation event unmodified
    • if controller is SimpleEvent and regulation is BioEventMention:
      • convert controller event to entity using convertEventToEntity
      • if converted controller is undefined return regulation event unmodified
      • else return new regulation event by replacing controller event with controller entity
    • if controller is not SimpleEvent or regulation is not BioEventMention return regulation event unmodified
  • mkActivation
    • Prefer Activations with SimpleEvents as the controller by using preferSimpleEventControllers
    • flip mention label if needed
    • remove dummy arg if needed
    • retrieve ComplexEvents that overlap this activation (NOTE: safer to retrieve "Regulations")
    • if this activation overlaps any Regulation, filter it out
    • if not hasDistinctControllerControlled filter activation out
    • if activation has no controller, return activation unmodified
    • if activation has entity controller, return activation unmodified
    • if activation has event controller:
      • convert controller event to entity using convertEventToEntity
      • if converted controller is undefined return activation event unmodified
      • else return new activation event by replacing controller event with controller entity
  • mkBinding
    • if mention is EventMention:
      • retrieve all theme1 and theme2 args from mention
      • if we only have one theme and it is not Unresolved, filter out binding mention
      • if a theme is Unresolved, return exact copy of binding mention
      • if theme1 is empty or theme2 is empty:
        • concatenate themes into mergedThemes (Note: should call distinct)
        • if only two themes and they have different ids (according to sameEntityID) and one theme contains text "ubiquitin":
          • discard ubiquitin theme
          • return new Ubiquitination event with theme=remaining theme
        • else:
          • get all combinations of 2 themes from mergedThemes
          • filter out pairs where sameEntityID returns true
          • if either member of the pair contains text "ubiquitin":
            • return new Ubiquitination event with theme=remaining theme
          • else:
            • return binarized Binding event
      • else: (if we have both theme1 and theme2)
        • for each (theme1, theme2) pair
        • filter pair if sameEntityID returns true
        • if either member of the pair contains text "ubiquitin":
          • return new Ubiquitination event with theme=remaining theme
          • else:
            • return binarized Binding event

Functions:

  • preferSimpleEventControllers
    • gets mentions with arguments or it breaks
    • if any mention has a SimpleEvent controller:
      • return only mentions with SimpleEvent Controllers
    • else return all mentions
  • switchLabel
    • if not BioEventMention return mention
    • make excluded token set with all tokens in trigger and arguments
    • use countSemanticNegatives to collect negative tokens for all trigger-argument pairs
    • if negative.size is odd:
      • use flipLabel to flip the main event label
      • return new BioEventMention with flipped label
  • removeDummy
    • get a BioMention
    • if it is a BioEventMention:
      • if it has argument(dummy) return event copy without dummy
      • else return event
    • else return mention
  • hasDistinctControllerControlled
    • gets a Mention
    • if mention does not have a controller, a controlled or both, return true
    • distinctArgs = check if controller and controlled are different mention
    • distinctGrounding = if they are both grounded check that they are different, else true
    • if distinctArgs and distinctGrounding return true, else false
  • convertEventToEntity
    • gets a BioEventMention
    • returns an Option[BioMention]
    • if event is not SimpleEvent return None
    • if event is Binding:
      • return BioRelationMention by dropping trigger and changing label to Complex
    • else:
      • retrieve event(theme)
      • retrieve event(site) if it exists
      • copy theme to new BioTextBoundMention (copy not convert)
      • get modification label from event.trigger
      • attach PTM modification to BioTextBoundMention
  • countSemanticNegatives
    • gathers tokens that are considered negative
    • gets set of token ids that should be excluded from consideration
    • gets a trigger and an arg as Mentions
    • finds shortest path between some token in trigger and some token in arg
    • collects token ids from shortest path that match semantic negative pattern
  • flipLabel
    • gets a string that starts with "Positive" or "Negative"
    • returns label with flipped polarity
  • sameEntityID
    • gets a list of mentions
    • if there are grounded mentions:
      • ignore ungrounded mentions
      • if all grounded mentions have same id return true
      • else return false
    • else return false

globalAction (applied in this order):

  • siteSniffer (these seems to hurt us, we forget to which entity each site belongs)
    • Propagate any Sites in the Modifications of any argument of a SimpleEvent to the event "Site" argument, and remove them from each argument
    • if mention is not SimpleEvent return it unmodified
    • collect into additionalSites all EventSite.site modification from each arguments and remove them from each argument
    • allSites = additionalSites + mention("site")
    • if no sites return return mention unmodified
    • else:
      • remove "site" from mention arguments
      • create a copy of mention for each site in allSites
  • detectNegations
  • detectHypotheses
  • splitSimpleEvents