MPL pattern set ‘med’

This is the pattern set ‘med’ described in Chapter 4 of my thesis.

# Match rules.
# These are regular expressions which allow variables to match individual pattern elements (or parts thereof).
# match means must match, !match means must match anything but...





# @ENTITY, @AGENT and @TARGET can be anything containing an entity:

match @ENTITY = Entity[a-z]{1,2}
match @AGENT = Entity[a-z]{1,2}
match @TARGET = Entity[a-z]{1,2}

# 'Which' and 'that' are fairly interchangeable:

match @WHICH = ^(which|that)$

# @NOUN is an unusual one as it matches POS tag nodes rather than words.
# For now, it's set to the same list as the default chunkable tags in NounPhraseChunker:

match @NOUN = ^(NN|NNS|NNP|NNPS|DT|CD|JJ|JJR|JJS|VBG|FW)$

# Same for @VERB which matches any verb POS:

match @VERB = ^VB.?$

# Let's allow these noun placeholders to be anything for now, and we can narrow them down later if we need to:

# !match @ATTRIBUTE = ^Entity[a-z]{1,2}$
# !match @FAMILY = ^Entity[a-z]{1,2}$
# !match @LOCATION = ^Entity[a-z]{1,2}$
# !match @PROCESS = ^Entity[a-z]{1,2}$
# !match @ROLE = ^Entity[a-z]{1,2}$
# !match @SUBSTANCE = ^Entity[a-z]{1,2}$

match @ATTRIBUTE = .*
match @FAMILY = .*
match @LOCATION = .*
match @PROCESS = .*
match @ROLE = .*
match @SUBSTANCE = .*
match @REGULATOR = .*
match @MODIFICATION = .*
match @CHANGE = .*
match @EFFECT = .*

# @REGULON can be singular or plural:

# match @REGULON = regulon




# Here are the interaction keywords that we're considering.
# Add replacement rule later to append co- to these!

# @AFFECT etc. for more-or-less-specific direct-object "A affects B" type relations. Note that some have quite different biological semantics (compare 'determines' and 'downregulates') but they are grouped by similar syntactic requirements:

# VB, VBP
match @AFFECT = ^(activate|affect|antagonise|antagonize|attenuate|bind|block|cause|control|convert|dephosphorylate|determine|direct|down-regulate|downregulate|express|drive|govern|inactivate|increase|induce|inhibit|initiate|limit|mediate|modify|modulate|perturb|phosphorylate|precede|prevent|produce|recognise|recognize|reduce|regulate|repress|stimulate|target|terminate|transcribe|up-regulate|upregulate)$

# VBD, VBN
match @AFFECTED = ^(activated|affected|antagonised|antagonized|attenuated|bound|blocked|caused|controlled|converted|dephosphorylated|determined|directed|down-regulated|downregulated|expressed|driven|governed|inactivated|increased|induced|inhibited|initiated|limited|mediated|modified|modulated|perturbed|phosphorylated|preceded|prevented|produced|recognised|recognized|reduced|regulated|repressed|stimulated|targeted|terminated|transcribed|up-regulated|upregulated)$

# VBZ
match @AFFECTS = ^(activates|affects|antagonises|antagonizes|attenuates|binds|blocks|causes|controls|converts|dephosphorylates|determines|directs|down-regulates|downregulates|expresses|drives|governs|inactivates|increases|induces|inhibits|initiates|limits|mediates|modifies|modulates|perturbs|phosphorylates|precedes|prevents|produces|recognises|recognizes|reduces|regulates|represses|stimulates|targets|terminates|transcribes|up-regulates|upregulates)$

# VBG, @NOUN
match @AFFECTING = ^(activating|affecting|antagonising|antagonizing|attenuating|binding|causing|blocking|controlling|converting|dephosphorylating|determining|directing|down-regulating|downregulating|expressing|driving|governing|inactivating|increasing|inducing|inhibiting|initiating|limiting|mediating|modifying|modulating|perturbing|phosphorylating|preceding|preventing|producing|recognising|recognizing|reducing|regulating|repressing|stimulating|targeting|terminating|transcribing|up-regulating|upregulating)$

# @REQUIRE etc. for 'backward' verbal relationships like "A requires B":

# VB, VBP
match @REQUIRE = ^(require|need)$

# VBD, VBN
match @REQUIRED = ^(required|needed)$

# VBZ
match @REQUIRES = ^(requires|needs)$

# VBG, @NOUN
match @REQUIRING = ^(requiring|needing)$

# @RESPONSIBLE for 'forward' adjectival relationships like "A is responsible for B":

match @RESPONSIBLE = ^(responsible|essential|necessary|sufficient|required|important|vital)$

# @DEPENDENT for 'backward' adjectival relationships like "A is dependent on B":

match @DEPENDENT = ^(dependent|reliant|driven)$

# @SIMILAR for sequence/structure similarity:

match @SIMILAR = ^(similar|homologous|orthologous|paralogous|identical)$

# @SENSITIVE for, well, 'sensitive' -- there must be other adjectives that take a to-complement?

match @SENSITIVE = sensitive

# @DEPEND etc. for verbed versions of the latter like "A depends on B"

# VB, VBP
match @DEPEND = ^(depend|rely)$

# VBD, VBN
match @DEPENDED = ^(depended|relied)$

# VBZ
match @DEPENDS = ^(depends|relies)$

# VBG, @NOUN
match @DEPENDING = ^(depending|relying)$

# @CONTRIBUTE etc. for verbs that take a to-object like "A contributes to B". Note that some have quite different biological semantics (compare 'contribute to' and 'bind to') but they are grouped by similar syntactic requirements:

# VB, VBP
match @CONTRIBUTE = ^(contribute|bind)$

# VBD, VBN
match @CONTRIBUTED = ^(contributed|bound)$

# VBZ
match @CONTRIBUTES = ^(contributes|binds)$

# VBG, @NOUN
match @CONTRIBUTING = ^(contributing|binding)$

# @SHOW etc. for rhetorical verbs that take a "that"-complement. Any others??

# VB, VBP
match @SHOW = ^(show|demonstrate|prove|determine|suggest|find)$

# VBD, VBN
match @SHOWED = ^(showed|shown|demonstrated|proved|determined|suggested|found)$

# VBZ
match @SHOWS = ^(shows|demonstrates|proves|determines|suggests|finds)$

# VBG, @NOUN
match @SHOWING = ^(showing|demonstrating|proving|determining|suggesting|finding)$

# @APPEAR for rhetorical verbs that take an infinitive complement.

# VB, VBP
match @APPEAR = ^(appear|seem|think|believe)$

# VBD, VBN
match @APPEARED = ^(appeared|seemed|thought|believed)$

# VBZ
match @APPEARS = ^(appears|seems|thinks|believes)$

# VBG, @NOUN
match @APPEARING = ^(appearing|seeming|thinking|believing)$

# @PLAY for... "play". Are there any others in this class?

# VB, VBP
match @PLAY = ^(play)$

# VBD, VBN
match @PLAYED = ^(played)$

# VBZ
match @PLAYS = ^(plays)$

# VBG, @NOUN
match @PLAYING = ^(playing)$

# @INCLUDE for... "include". Are there any others in this class?

# VB, VBP
match @INCLUDE = ^(include)$

# VBD, VBN
match @INCLUDED = ^(included)$

# VBZ
match @INCLUDES = ^(includes)$

# VBG, @NOUN
match @INCLUDING = ^(including)$

# @RESULT for... "result" (verb). Are there any others in this class?

# VB, VBP
match @RESULT = ^(result)$

# VBD, VBN
match @RESULTED = ^(resulted)$

# VBZ
match @RESULTS = ^(results)$

# VBG, @NOUN
match @RESULTING = ^(resulting)$

# @ACT for verbs that take an "as" or "like" complement. Any others?

# VB, VBP
match @ACT = ^(act|work|behave)$

# VBD, VBN
match @ACTED = ^(acted|worked|behaved)$

# VBZ
match @ACTS = ^(acts|works|behaves)$

# VBG, @NOUN
match @ACTING = ^(acting|working|behaving)$



# Some dependency type variables

# Allowable equivalents for prep_by:

match @PREP_BY = ^(prep_by|prep_through|prep_via)$

# And for prep_in:

match @PREP_IN = ^(prep_in|prep_within)$

# Match any preposition, just in case:

match @PREP = ^prep_.*$

# And for nsubj. prep_like is a hack to deal with things like "A, like B, affects...", and prep_than covers things like "more sensitive than":

match @NSUBJ = ^(nsubj|xsubj|prep_like|prep_than)$

# Also for nsubjpass (prep_like as above):

match @NSUBJPASS = ^(nsubjpass|prep_like)$






# Special variable to match anything:

match @@ = .*

# Special variable to match any sequence of characters not containing an underscore (useful in composites):

match @CHARS = [^_]+







replace VBZ~~is = VBP~~are
replace VBZ~~is = VBD~~were
replace VBZ~~is = VBD~~was

replace VB~~have = VBP~~have
replace VB~~have = VBZ~~has
replace VB~~have = VBD~~had
replace VB~~having = VBG~~having

replace VB~~belong = VBP~~belong
replace VB~~belong = VBZ~~belongs
replace VB~~belong = VBD~~belonged
replace VB~~belong = VBG~~belonging

replace VB~~@AFFECT = VBP~~@AFFECT
replace VB~~@AFFECT = VBZ~~@AFFECTS
replace VB~~@AFFECT = VBD~~@AFFECTED
replace VB~~@AFFECT = VBG~~@AFFECTING

replace VB~~@REQUIRE = VBP~~@REQUIRE
replace VB~~@REQUIRE = VBZ~~@REQUIRES
replace VB~~@REQUIRE = VBD~~@REQUIRED
replace VB~~@REQUIRE = VBG~~@REQUIRING

replace VB~~@DEPEND = VBP~~@DEPEND
replace VB~~@DEPEND = VBZ~~@DEPENDS
replace VB~~@DEPEND = VBD~~@DEPENDED
replace VB~~@DEPEND = VBG~~@DEPENDING

replace VB~~@PLAY = VBP~~@PLAY
replace VB~~@PLAY = VBZ~~@PLAYS
replace VB~~@PLAY = VBD~~@PLAYED
replace VB~~@PLAY = VBG~~@PLAYING

replace VB~~@INCLUDE = VBP~~@INCLUDE
replace VB~~@INCLUDE = VBZ~~@INCLUDES
replace VB~~@INCLUDE = VBD~~@INCLUDED
replace VB~~@INCLUDE = VBG~~@INCLUDING

replace VB~~@RESULT = VBP~~@RESULT
replace VB~~@RESULT = VBZ~~@RESULTS
replace VB~~@RESULT = VBD~~@RESULTED
replace VB~~@RESULT = VBG~~@RESULTING

replace VB~~@APPEAR = VBP~~@APPEAR
replace VB~~@APPEAR = VBZ~~@APPEARS
replace VB~~@APPEAR = VBD~~@APPEARED
replace VB~~@APPEAR = VBG~~@APPEARING

replace VB~~@ACT = VBP~~@ACT
replace VB~~@ACT = VBZ~~@ACTS
replace VB~~@ACT = VBD~~@ACTED
replace VB~~@ACT = VBG~~@ACTING

replace VB~~@CONTRIBUTE = VBP~~@CONTRIBUTE
replace VB~~@CONTRIBUTE = VBZ~~@CONTRIBUTES
replace VB~~@CONTRIBUTE = VBD~~@CONTRIBUTED
replace VB~~@CONTRIBUTE = VBG~~@CONTRIBUTING

replace @AGENT = @PROCESS ( prep_of @NOUN~~@AGENT )
replace @TARGET = @PROCESS ( prep_of @NOUN~~@TARGET )



# Adjective-driven patterns

# "A is responsible for B":

pattern
JJ~~@RESPONSIBLE
	( @NSUBJ @NOUN~~@AGENT )
	( prep_for @NOUN~~@TARGET )
end

# "A is dependent on B":

pattern
JJ~~@DEPENDENT
	( prep_on @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end

# "A is sensitive to B":

pattern
JJ~~@SENSITIVE
	( prep_to @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end





# Simple verb-driven patterns

# "A [can/may/will/etc.] affect[s/ed/ing] B":

pattern
VB~~@AFFECT
	( @NSUBJ @NOUN~~@AGENT )
	( dobj @NOUN~~@TARGET )
end

# The passive equivalent

# "A [is/was/etc.] affected by B":

pattern
VBN~~@AFFECTED
	( agent @NOUN~~@AGENT )
	( @NSUBJPASS @NOUN~~@TARGET )
end

# The 'rhetorical-passive' equivalent

# "A [is/was/etc.] believed to be affected by B":

pattern
VBN~~@APPEARED
	( xcomp VBN~~@AFFECTED ( agent @NOUN~~@AGENT ) )
	( @NSUBJPASS @NOUN~~@TARGET )
end

# "A contributes to B" etc.:

pattern
VB~~@CONTRIBUTE
	( @NSUBJ @NOUN~~@AGENT )
	( prep_to @NOUN~~@TARGET )
end

# "A binds to a site on B" etc.:

pattern
VB~~@CONTRIBUTE
	( @NSUBJ @NOUN~~@AGENT )
	( prep_to @NOUN~~@LOCATION ( prep_on @NOUN~~@TARGET ) )
end




# Reverse verb-driven patterns

# "A [can/may/will] require B":

pattern
VB~~@REQUIRE
	( dobj @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end

# "A [can/may/will] require  of B":

pattern
VB~~@REQUIRE
	( dobj @NOUN~~@PROCESS ( prep_of @NOUN~~@AGENT ) )
	( @NSUBJ @NOUN~~@TARGET )
end

# The passive equivalent

# "A [is/was/etc.] required by B":

pattern
VBN~~@REQUIRED
	( @NSUBJPASS @NOUN~~@AGENT )
	( agent @NOUN~~@TARGET )
end

# "A [can/will/etc.] depend on B":

pattern
VB~~@DEPEND
	( prep_on @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end

# "A results from B"

pattern
VB~~@RESULT
	( prep_from @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end





# Copular patterns

# "A is under the control of B":

pattern
VBZ~~is
	( prep_under @NOUN~~@AGENT )
	( @NSUBJ @NOUN~~@TARGET )
end




# "acts as" type patterns

# "A acts as B":

pattern
VB~~@ACT
	( @NSUBJ @NOUN~~@AGENT )
	( prep_as @NOUN~~@TARGET )
end





# Membership of group patterns

# "A belongs to increasing number of B-dependent genes" (quite specific):

pattern
VB~~belong
	( prep_to @NOUN~~@ROLE ( prep_of @NOUN~~{#AGENT_@DEPENDENT_@@} ) )
	( @NSUBJ @NOUN~~@TARGET )
end




# Nominal patterns not using composites

# "modification of A by B":

pattern
@NOUN~~@MODIFICATION
	( prep_of @NOUN~~@TARGET )
	( @PREP_BY @NOUN~~@AGENT )
end

# Patterns involving composites and other nodes

# "The A regulon includes B" etc.:

pattern
VB~~@INCLUDE
	( @NSUBJ @NOUN~~{#AGENT_regulon} )
	( dobj @NOUN~~@TARGET )
end

# "A-dependent expression of B" etc.:

pattern
@NOUN~~{#AGENT_@DEPENDENT_@PROCESS}
	( prep_of @NOUN~~@TARGET )
end

# "A is a member of the B regulon" etc.:

pattern
@NOUN~~@ROLE
	( prep_of @NOUN~~{#AGENT_regulon} )
	( @NSUBJ @NOUN~~@TARGET )
end

# "X is a Y-dependent gene" etc.:

pattern
@NOUN~~{#AGENT_dependent}
	( @NSUBJ @NOUN~~@TARGET )
end







# Patterns involving just composites

# "A-dependent B":

pattern
@NOUN~~{#AGENT_@DEPENDENT_#TARGET}
end

# "A-dependent ... B" -- maybe we can figure out a more elegant way to do this later!

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_@CHARS_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_#TARGET}
end

pattern
@NOUN~~{#AGENT_@DEPENDENT_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_@CHARS_#TARGET}
end
Advertisements
%d bloggers like this: