org.clulab.assembly.grammars.precedence.yml Maven / Gradle / Ivy
The newest version!
# assembly sub-tree moved to main taxonomy
# these rules make use of labels that exist in that taxonomy
# rather than duplicate it here, the assembly branch was grafted there
taxonomy: org/clulab/reach/biogrammar/taxonomy.yml
# vars for assembly sieve
vars:
mylabel: "Precedence"
deprulepriority: "1"
surfacerulepriority: "2"
# < operator should be outside of regex
after_type: "Event"
# "after" should be some kind of Event that transforms "before"
before_type: "Event"
beforesurface: "[lemma=/^(before|prior|precede)$/]"
aftersurface: "[lemma=/^follow|after$/]"
# rules for assembly sieve
rules:
# Event rules
- name: assembly-prep-syntax-1
label: ${mylabel}
priority: ${deprulepriority}
example: "BEF is ubiquitinated before the phosphorylation of AFT."
pattern: |
before:${before_type}
# before the AFT
# TODO: Write surface rule for prior_to relations
after:${after_type} = prep_before
- name: assembly-prep-surface-1
label: ${mylabel}
priority: ${deprulepriority}
example: "BEF is ubiquitinated before the phosphorylation of AFT."
type: token
pattern: |
(? ${before_type}) (before | prior to) [tag=/^(DT|CD|JJ)$/]* (? ${after_type})
- name: assembly-prep-syntax-2
label: ${mylabel}
priority: ${deprulepriority}
example: "AFT is ubiquitinated following the phosphorylation of BEF."
pattern: |
after:${after_type}
# after BEF
before:${before_type} = /^prep_(after|following)$/
- name: assembly-prep-surface-2
label: ${mylabel}
priority: ${surfacerulepriority}
example: "AFT is ubiquitinated following the phosphorylation of BEF."
type: token
pattern: |
(? ${after_type}) (after | [lemma=follow]) [tag=/^(DT|CD|JJ)$/]* (? ${before_type})
- name: assembly-prep-syntax-3
label: DirectConnection
priority: ${deprulepriority}
example: "AFT is ubiquitinated due to the phosphorylation of BEF."
pattern: |
after:${after_type}
# due to BEF
before:${before_type} = prep_due_to | prep_because_of
- name: assembly-prep-surface-3
label: ${mylabel}
priority: ${surfacerulepriority}
example: "AFT is ubiquitinated due to the phosphorylation of BEF."
type: token
pattern: |
(? ${after_type}) (due to | because of) [tag=/^(DT|CD|JJ)$/]* (? ${before_type})
# - name: assembly-verb-syntax-1
# label: DirectConnection
# priority: ${deprulepriority}
# example: "the ubiquitination of BEF leads to the phosphorylation of AFT."
# pattern: |
# before:${before_type}
# # ... leads to AFT
# after:${after_type} = ${before_type}) [lemma=/^(precede|precipitat)/] [tag=/^(DT|CD|JJ)$/]* (? ${after_type})
- name: assembly-verb-syntax-3
example: "AFT ubiquitination is a result of BEF phosphorylation. AFT ubiquitination results from BEF phosphorylation."
label: ${mylabel}
priority: ${deprulepriority}
pattern: |
before:${after_type}
# AFT results from BEF
after:${before_type} = (prepc?_of|prep_from)/ [lemma=result] nsubj
- name: assembly-verb-surface-3a
label: ${mylabel}
priority: ${surfacerulepriority}
example: "AFT ubiquitination is a result of BEF phosphorylation."
type: token
pattern: |
(? ${after_type}) [lemma=be] [tag=/^(DT|CD|JJ)$/] [lemma=result] of [tag=/^(DT|CD|JJ)$/]* (? ${before_type})
- name: assembly-verb-surface-3b
label: ${mylabel}
priority: ${surfacerulepriority}
example: "AFT ubiquitination results from BEF phosphorylation."
type: token
pattern: |
(? ${after_type}) ","? [tag=RB]? [lemma=result & tag=/^VB/] from [tag=/^(DT|CD|JJ)$/]* (? ${before_type})
- name: assembly-verb-syntax-4
example: "BEF is ubiquitinated, resulting in the phosphorylation of AFT."
label: ${mylabel}
priority: ${deprulepriority}
pattern: |
after:${after_type}
# BEF ..., resulting from ...
before:${before_type} = xcomp nsubjpass
- name: assembly-verb-surface-4and6
label: ${mylabel}
priority: ${surfacerulepriority}
example: "BEF is ubiquitinated, resulting in the phosphorylation of AFT."
type: token
pattern: |
(? ${before_type}) ","? [tag=RB]? [lemma=result & tag=/^VB/] in [tag=/^(DT|CD|JJ)$/]* (? ${after_type})
- name: assembly-verb-syntax-5
example: "As a result of BEF phosphorylation, AFT is ubiquitinated. AFT is phosphorylated as a result of BEF ubiqutination."
label: ${mylabel}
priority: ${deprulepriority}
pattern: |
after:${after_type}
before:${before_type} = prep_as [lemma=result] /prepc?_of/
- name: assembly-verb-syntax-6
example: "AFT phosphorylation results in BEF ubiqutination."
label: ${mylabel}
priority: ${deprulepriority}
pattern: |
before:${before_type}
after:${after_type} = ${before_type}) ","? when (? ${after_type})
# Passives
- name: assembly-syntax-pass-1
label: DirectConnection
priority: ${deprulepriority}
example: "the ubiquitination of BEF is followed by the phosphorylation of AFT."
pattern: |
before:${before_type}
after:${after_type} =
© 2015 - 2025 Weber Informatics LLC | Privacy Policy