<commit_before>{$negstems}=/imposs|improb|immort|inevit|incomp|indirec|inadeq|insuff|ineff|incong|incoh|inacc|invol[iu]|infreq|inapp|indist|infin|intol|dislik|dys|dismount|disadvant|disinteg|disresp|disagr|disjoin|disprov|disinterest|discomfort|dishonest|disband|disentangl/
{$neglemmas}=/nowhere|never|nothing|none|undo|uncover|unclench|no|not|n't|ne|pas/

# Fixed values from CoreNLP
xpos=/^NNP?$/	none	#1:morph+=Number=Sing
xpos=/^NNP?S$/	none	#1:morph+=Number=Plur
xpos=/^VBZ$/	none	#1:morph+=Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin
xpos=/^VBD$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Past
xpos=/^VBN$/	none	#1:morph+=Tense=Past|VerbForm=Part
xpos=/^VBP$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Pres
xpos=/^MD$/	none	#1:morph+=VerbForm=Fin
xpos=/^JJ$/	none	#1:morph+=Degree=Pos
xpos=/^JJR$/	none	#1:morph+=Degree=Cmp
xpos=/^JJS$/	none	#1:morph+=Degree=Sup
xpos=/^CD$/	none	#1:morph+=NumType=Card
text=/(?i)^am$/&xpos=/^VBP$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Pres|Person=1|Number=Sing
text=/(?i)^was$/&xpos=/^VBD$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Past|Number=Sing
text=/(?i)^i$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs|Case=Nom
text=/(?i)^you$/&xpos=/^PRP$/	none	#1:morph+=Person=2|PronType=Prs
text=/(?i)^he$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs|Case=Nom
text=/(?i)^she$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs|Case=Nom
text=/(?i)^it$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|PronType=Prs
text=/(?i)^we$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs|Case=Nom
text=/(?i)^they$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs|Case=Nom
text=/(?i)^me$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs|Case=Acc
text=/(?i)^h?'?im$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs|Case=Acc
text=/(?i)^her$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs|Case=Acc
text=/(?i)^['u]s$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs|Case=Acc
text=/(?i)^(th)?'?em$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs|Case=Acc
text=/(?i)^my|mine$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=1|Poss=Yes|PronType=Prs
text=/(?i)^yours?$/&xpos=/^PRP\$$/	none	#1:morph+=Person=2|Poss=Yes|PronType=Prs
text=/(?i)^his$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|Poss=Yes|PronType=Prs
text=/(?i)^her$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|Poss=Yes|PronType=Prs
text=/(?i)^hers$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|Poss=Yes|PronType=Prs
text=/(?i)^its$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|Poss=Yes|PronType=Prs
text=/(?i)^ours?$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Plur|Person=1|Poss=Yes|PronType=Prs
text=/(?i)^theirs?$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Plur|Person=3|Poss=Yes|PronType=Prs
text=/(?i)^myself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs
text=/(?i)^yourself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=2|PronType=Prs
text=/(?i)^himself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs
text=/(?i)^herself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs
text=/(?i)^itself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|PronType=Prs
text=/(?i)^ourselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs
text=/(?i)^yourselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=2|PronType=Prs
text=/(?i)^themselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs
text=/(?i)^the$/&xpos=/^DT$/	none	#1:morph+=Definite=Def|PronType=Art
text=/(?i)^an?$/&xpos=/^DT$/	none	#1:morph+=Definite=Ind|PronType=Art
text=/(?i)^(this|that)$/&xpos=/^DT$/	none	#1:morph+=PronType=Dem|Number=Sing
text=/(?i)^th[oe]se$/&xpos=/^DT$/	none	#1:morph+=PronType=Dem|Number=Plur
text=/(?i)^(t?here|then)$/&xpos=/^RB$/	none	#1:morph+=PronType=Dem
text=/(?i)^whose$/&xpos=/^WP\$$/	none	#1:morph+=Poss=Yes
xpos=/^RB$/&lemma!=/^(thus|even|as|not|over|very|yet|only|namely|already|also|once|twice|thrice|then|t?here|about|out|now|pretty|quite|rather|some(what|where|how|time)s?|maybe|always|just|merely|any(way|how|where|time)s?|likewise|so)$/	none	#1:morph+=Degree=Pos
xpos=/^RBR$/	none	#1:morph+=Degree=Cmp
xpos=/^RBS$/	none	#1:morph+=Degree=Sup

# Ordinals
lemma=/^(first|second|third|fourth|fifth|sixth|seventh|eigth|ninth|tenth|([0-9,.]+(th|st|nd|rd)))$/&xpos=/JJ|RB/	none	#1:morph+=NumType=Ord
# Multiplicative adverbs
lemma=/^(once|twice|thrice)$/&xpos=/RB/	none	#1:morph+=NumType=Mult
# Reflexives
lemma=/^(myself|yourself|himself|herself|itself|ourselves|yourselves|themselves)$/&func!=/.*npmod/	none	#1:morph+=Reflex=Yes;#1:morph+=Case=Acc

# Case
# Initially assume all pronouns are non-subjects
xpos=/^PRP$/&lemma!=/^(myself|yourself|himself|herself|itself|ourselves|yourselves|themselves)$/	none	#1:morph+=Case=Acc
# Catch clear nominatives
xpos=/^PRP$/&text=/(?i)^(I|we|they|he|she)$/	none	#1:morph+=Case=Nom
xpos=/^PRP$/&func=/nsubj.*/	none	#1:morph+=Case=Nom
# Coordination
func=/nsubj.*/;xpos=/^PRP$/&text=/(?i)^(it|you)$/&func=/conj/	#1>#2	#2:morph+=Case=Nom

# Nominal number
# Assume singular you
lemma=/you/&xpos=/PRP/	none	#1:morph+=Number=Sing
# "you guys", "you all" and similar
xpos=/NNS/;xpos=/PRP/&lemma=/you/&func=/dep/	#1>#2;#2.*#1	#2:morph+=Number=Plur
xpos=/NNS/&func=/nsubj.*/;xpos=/PRP/&lemma=/you/&func=/dep/	#1>#2;#2.*#1	#2:morph+=Case=Nom
lemma=/you/;lemma=/all/	#1>#2	#1:morph+=Number=Plur
xpos=/V.*/;lemma=/you/;lemma=/all/	#1>#2;#1>#3;#2.*#3	#2:morph+=Number=Plur
# Multiple addressees
lemma=/you/;#S:addressee=/.*,.*/	#2>#1	#1:morph+=Number=Plur

# Relatives
# Assume wh pronuns are interrogative
xpos=/W.*/&lemma!=/that/	none	#1:morph+=PronType=Int
# Standard relative
xpos=/W.*/;func=/acl:relcl/	#2>#1;#1.*#2	#1:morph+=PronType=Rel
# Free relative
xpos=/W.*/;func=/acl:relcl/	#1>#2	#1:morph+=PronType=Rel
# Possessive 'whose' relative
xpos=/WP\$/&func=/nmod:poss/;func=/acl:relcl/;func=/.*/	#2>#3>#1;#1.*#2	#1:morph+=PronType=Rel

# Verb person and number
# Assume 3rd person
xpos=/V.[PZD]/	none	#1:morph+=Person=3|Number=Sing
morph=/.*Plur.*/;func=/acl:relcl/&xpos=/V.[PZD]/;xpos=/WDT/&func=/[cn]subj.*/	#1>#2>#3	#2:morph+=Number=Plur|Person=3
xpos=/V.[PZD]/;func=/[cn]subj.*/&morph=/.*Number.Plur.*/	#1>#2	#1:morph+=Number=Plur
# Plurality through coordination
xpos=/V.[PZD]/;func=/[cn]subj.*/;func=/conj/	#1>#2>#3	#1:morph+=Number=Plur
xpos=/V.*/;xpos=/V.[PZD]/&func=/aux.*|cop/;func=/[cn]subj.*/;func=/conj/	#1>#2;#1>#3>#4	#2:morph+=Number=Plur
# Copy person from a person-marked subject
xpos=/V.[PZD]/;func=/[cn]subj.*/&morph=/.*Person.([0-9]).*/	#1>#2	#1:morph+=Person=$1
xpos=/V.[PZD]/;func=/[cn]subj.*/;func=/conj/&morph=/.*Person.([0-9]).*/	#1>#2>#3	#1:morph+=Number=Plur|Person=$1
xpos=/V.[PZD]/&func=/cop|aux.*/;func=/[cn]subj.*/&morph=/.*Number.Plur.*/;text=/.*/	#3>#2;#3>#1	#1:morph+=Number=Plur
xpos=/V.[PZD]/&func=/cop|aux.*/;func=/[cn]subj.*/&morph=/.*Person.([0-9]).*/;text=/.*/	#3>#2;#3>#1	#1:morph+=Person=$1
xpos=/VBZ/	none	#1:morph+=Number=Sing|Person=3
# VBP mistakenly labeled 3 Sing must be Plur
xpos=/VBP/&morph=/Sing.*3/	none	#1:morph+=Number=Plur

# Imperative
xpos=/VB/;func=/.*subj.*/	#1>#2	#1:head2=hassubj
xpos=/VB/;func=/aux.*/&xpos=/VBP/	#1>#2	#1:head2+=hasfinaux
xpos=/VB/;func=/mark/&xpos=/TO/	#1>#2	#1:head2+=hasto
xpos=/.*/;func=/.*subj.*/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:head2+=hassubj
xpos=/.*/;func=/aux.*/&xpos=/VBP/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:head2+=hasfinaux
xpos=/VB/;func=/mark/&xpos=/TO/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:head2+=hasto
xpos=/VB/&head2!=/has.*/&func=/root|conj|parataxis|ccomp/	none	#1:morph+=Mood=Imp|Person=2|VerbForm=Fin
xpos=/VB/&morph!=/.*Mood.Imp.*/	none	#1:morph+=VerbForm=Inf
# Infinitive matrix clause root in non imp s_type
func=/root|parataxis|conj/&xpos=/VB/&morph=/.*Mood.Imp.*/;#S:s_type=/inf|q|wh|frag|sub|decl/	#2>#1	#1:morph+=Mood=Ind|VerbForm=Inf
morph=/(.*)Mood.[^|]+\|?(.*)/&morph=/.*VerbForm.Inf.*/	none	#1:morph=$1$2
xpos=/VB[PZD]/&morph=/.*Number.([^|]+).*Person.([0-9]).*/;func=/conj/&head2!=/.*hassubj.*/	#1>#2	#2:morph+=Number=$1|Person=$2
# Subjectless question
xpos=/VBP/&morph=/.*Number.Sing.*Person.3.*/&head2!=/.*hassubj.*/;#S:s_type=/q|wh/	#2>#1	#1:morph+=Person=2
head2=/has.*/	none	#1:head2=_

# Gerund
xpos=/VBG/	none	#1:morph+=VerbForm=Ger
xpos=/VBG/;lemma=/be/&func=/aux/	#1>#2	#1:morph+=Tense=Pres|VerbForm=Part

# Voice
xpos=/V.*/;func=/aux:pass/	#1>#2	#1:morph+=Voice=Pass

# Abbr
text=/^(US|NASA|NATO|U\.S\.|USI|DH|DAB|UK|IE6|COVID-19|KPA|UNESCO|FTU|LA|VR|MLB|USA|IATA|ROS|CC|IE|OK|ABC|BBC|DSW|NBC|U\.S|KCNA|ACPeds|US-412|WB|CBC|ICI|ISO|JSC|KKK|KSC|PHX|WHO|BART|CNRS|ELI5|FIFA|O\.J\.|NWSC|ROTC|BAFTA|STS-1|US-75|US-169|NEMISIS|STS-133|STS-134|STS-135|NSU|FEDERAL|ANDRILL|AS|AV|CO|CV|CW|DC|FN|GW|JK|KS|LV|MC|NB|NJ|NZ|PC|QC|RA|SC|ST|UC|VM|XP|XV|AFP|AIM|BAK|BBF|BPA|CBS|CEI|CIS|CRA|DBE|DNA|FRS|GIS|GPL|HBO|HIV|IDD|IE9|IFN|IMU|IQA|IRC|JFK|JPL|LIS|LSD|MIT|MSN|MTV|NBA|NFL|NHS|NPP|NSW|NTU|OIR|ROS|RVS|SNY|TUL|UKB|UNC|USD|USS|WTA|XML|ADPL|AIDS|AKMA|B\.A\.|ARES|D\.C\.|DPRK|FFFF|FGCU|HECS|HTML|IOTM|IRIS|K\.C\.|L\.A\.|MASS|MMPI|OSCE|S\.F\.|SETI|TAOM|THEO|U\.N\.|UAAR|WWII|XKCD|DHBs|U\.S\.|BY-SA|CITIC|LIBER|M\.Sc\.|NCLAN|ODIHR|UNMIK|OSU|CC-BY-SA-NC|CBC\.ca|DH+Lib|DH2017|e\.g\.|al\.|etc\.|Mr\.|St\.|i\.e\.|c\.|b\.|Ph\.D\.|Mrs\.|d\.|m\.|p\.|Dr\.|Jr\.|No\.|vs\.|div\.|approx\.|a\.|Ed\.|Mt\.|Op\.|ca\.|cm\.|Ave\.|Cal\.|E\.g\.|Feb\.|Inc\.|Vol\.|a\.m\.|eds\.|p\.m\.|M\.Sc\.|Mlle\.|Prof\.)$/	none	#1:morph+=Abbr=Yes

# Polarity
lemma=/(?i)^(({$negstems}.*)|({$neglemmas})|(no[nt]-.*))$/	none	#1:morph+=Polarity=Neg
lemma=/un.*/&xpos=/JJ.*|RB.*/&lemma!=/unique|under/	none	#1:morph+=Polarity=Neg

# NumForm
xpos=/CD/	none	#1:morph+=NumForm=Word
xpos=/CD/&lemma=/[0-9.,]+/	none	#1:morph+=NumForm=Digit
xpos=/CD/&lemma=/[XIVMCDL]+\.?/	none	#1:morph+=NumForm=Roman
<commit_msg>improvements   * add imperative mood in negation ("don't V")   * add grammatical case for expletives   * prevent case sensitivity regex flag warning<commit_after>{$negstems}=/imposs|improb|immort|inevit|incomp|indirec|inadeq|insuff|ineff|incong|incoh|inacc|invol[iu]|infreq|inapp|indist|infin|intol|dislik|dys|dismount|disadvant|disinteg|disresp|disagr|disjoin|disprov|disinterest|discomfort|dishonest|disband|disentangl/
{$neglemmas}=/nowhere|never|nothing|none|undo|uncover|unclench|no|not|n't|ne|pas/

# Fixed values from CoreNLP
xpos=/^NNP?$/	none	#1:morph+=Number=Sing
xpos=/^NNP?S$/	none	#1:morph+=Number=Plur
xpos=/^VBZ$/	none	#1:morph+=Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin
xpos=/^VBD$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Past
xpos=/^VBN$/	none	#1:morph+=Tense=Past|VerbForm=Part
xpos=/^VBP$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Pres
xpos=/^MD$/	none	#1:morph+=VerbForm=Fin
xpos=/^JJ$/	none	#1:morph+=Degree=Pos
xpos=/^JJR$/	none	#1:morph+=Degree=Cmp
xpos=/^JJS$/	none	#1:morph+=Degree=Sup
xpos=/^CD$/	none	#1:morph+=NumType=Card
text=/^(?i)am$/&xpos=/^VBP$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Pres|Person=1|Number=Sing
text=/^(?i)was$/&xpos=/^VBD$/	none	#1:morph+=VerbForm=Fin|Mood=Ind|Tense=Past|Number=Sing
text=/^(?i)i$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs|Case=Nom
text=/^(?i)you$/&xpos=/^PRP$/	none	#1:morph+=Person=2|PronType=Prs
text=/^(?i)he$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs|Case=Nom
text=/^(?i)she$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs|Case=Nom
text=/^(?i)it$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|PronType=Prs
text=/^(?i)we$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs|Case=Nom
text=/^(?i)they$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs|Case=Nom
text=/^(?i)me$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs|Case=Acc
text=/^(?i)h?'?im$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs|Case=Acc
text=/^(?i)her$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs|Case=Acc
text=/^(?i)['u]s$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs|Case=Acc
text=/^(?i)(th)?'?em$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs|Case=Acc
text=/^(?i)my|mine$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=1|Poss=Yes|PronType=Prs
text=/^(?i)yours?$/&xpos=/^PRP\$$/	none	#1:morph+=Person=2|Poss=Yes|PronType=Prs
text=/^(?i)his$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|Poss=Yes|PronType=Prs
text=/^(?i)her$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|Poss=Yes|PronType=Prs
text=/^(?i)hers$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|Poss=Yes|PronType=Prs
text=/^(?i)its$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|Poss=Yes|PronType=Prs
text=/^(?i)ours?$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Plur|Person=1|Poss=Yes|PronType=Prs
text=/^(?i)theirs?$/&xpos=/^PRP\$$/	none	#1:morph+=Number=Plur|Person=3|Poss=Yes|PronType=Prs
text=/^(?i)myself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=1|PronType=Prs
text=/^(?i)yourself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=2|PronType=Prs
text=/^(?i)himself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Masc|PronType=Prs
text=/^(?i)herself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Fem|PronType=Prs
text=/^(?i)itself$/&xpos=/^PRP$/	none	#1:morph+=Number=Sing|Person=3|Gender=Neut|PronType=Prs
text=/^(?i)ourselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=1|PronType=Prs
text=/^(?i)yourselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=2|PronType=Prs
text=/^(?i)themselves$/&xpos=/^PRP$/	none	#1:morph+=Number=Plur|Person=3|PronType=Prs
text=/^(?i)the$/&xpos=/^DT$/	none	#1:morph+=Definite=Def|PronType=Art
text=/^(?i)an?$/&xpos=/^DT$/	none	#1:morph+=Definite=Ind|PronType=Art
text=/^(?i)(this|that)$/&xpos=/^DT$/	none	#1:morph+=PronType=Dem|Number=Sing
text=/^(?i)th[oe]se$/&xpos=/^DT$/	none	#1:morph+=PronType=Dem|Number=Plur
text=/^(?i)(t?here|then)$/&xpos=/^RB$/	none	#1:morph+=PronType=Dem
text=/^(?i)whose$/&xpos=/^WP\$$/	none	#1:morph+=Poss=Yes
xpos=/^RB$/&lemma!=/^(thus|even|as|not|over|very|yet|only|namely|already|also|once|twice|thrice|then|t?here|about|out|now|pretty|quite|rather|some(what|where|how|time)s?|maybe|always|never|just|merely|any(way|how|where|time)s?|likewise|so|however|either)$/	none	#1:morph+=Degree=Pos
xpos=/^RBR$/	none	#1:morph+=Degree=Cmp
xpos=/^RBS$/	none	#1:morph+=Degree=Sup

# Ordinals
lemma=/^(first|second|third|fourth|fifth|sixth|seventh|eigth|ninth|tenth|([0-9,.]+(th|st|nd|rd)))$/&xpos=/JJ|RB/	none	#1:morph+=NumType=Ord
# Multiplicative adverbs
lemma=/^(once|twice|thrice)$/&xpos=/RB/	none	#1:morph+=NumType=Mult
# Reflexives
lemma=/^(myself|yourself|himself|herself|itself|ourselves|yourselves|themselves)$/&func!=/.*npmod/	none	#1:morph+=Reflex=Yes;#1:morph+=Case=Acc

# Case
# Initially assume all pronouns are non-subjects
xpos=/^PRP$/&lemma!=/^(myself|yourself|himself|herself|itself|ourselves|yourselves|themselves|one)$/	none	#1:morph+=Case=Acc
# Catch clear nominatives
xpos=/^PRP$/&text=/^(?i)(I|we|they|he|she)$/	none	#1:morph+=Case=Nom
xpos=/^PRP$/&func=/nsubj.*/&lemma!=/one/	none	#1:morph+=Case=Nom
# Coordination
func=/nsubj.*/;xpos=/^PRP$/&text=/^(?i)(it|you)$/&func=/conj/	#1>#2	#2:morph+=Case=Nom
# Expletives
func=/expl/;func=/.*/;func=/csubj/	#2>#1;#2>#3	#1:morph+=Case=Nom

# Nominal number
# Assume singular you
lemma=/you/&xpos=/PRP/	none	#1:morph+=Number=Sing
# "you guys", "you all" and similar
xpos=/NNS/;xpos=/PRP/&lemma=/you/&func=/dep/	#1>#2;#2.*#1	#2:morph+=Number=Plur
xpos=/NNS/&func=/nsubj.*/;xpos=/PRP/&lemma=/you/&func=/dep/	#1>#2;#2.*#1	#2:morph+=Case=Nom
lemma=/you/;lemma=/all/	#1>#2	#1:morph+=Number=Plur
xpos=/V.*/;lemma=/you/;lemma=/all/	#1>#2;#1>#3;#2.*#3	#2:morph+=Number=Plur
# Multiple addressees
lemma=/you/;#S:addressee=/.*,.*/	#2>#1	#1:morph+=Number=Plur

# Relatives
# Assume wh pronuns are interrogative
xpos=/W.*/&lemma!=/that/	none	#1:morph+=PronType=Int
# Standard relative
xpos=/W.*/;func=/acl:relcl/	#2>#1;#1.*#2	#1:morph+=PronType=Rel
# Free relative
xpos=/W.*/;func=/acl:relcl/	#1>#2	#1:morph+=PronType=Rel
# Possessive 'whose' relative
xpos=/WP\$/&func=/nmod:poss/;func=/acl:relcl/;func=/.*/	#2>#3>#1;#1.*#2	#1:morph+=PronType=Rel

# Verb person and number
# Assume 3rd person
xpos=/V.[PZD]/	none	#1:morph+=Person=3|Number=Sing
morph=/.*Plur.*/;func=/acl:relcl/&xpos=/V.[PZD]/;xpos=/WDT/&func=/[cn]subj.*/	#1>#2>#3	#2:morph+=Number=Plur|Person=3
xpos=/V.[PZD]/;func=/[cn]subj.*/&morph=/.*Number.Plur.*/	#1>#2	#1:morph+=Number=Plur
# Plurality through coordination
xpos=/V.[PZD]/;func=/[cn]subj.*/;func=/conj/	#1>#2>#3	#1:morph+=Number=Plur
xpos=/V.*/;xpos=/V.[PZD]/&func=/aux.*|cop/;func=/[cn]subj.*/;func=/conj/	#1>#2;#1>#3>#4	#2:morph+=Number=Plur
# Copy person from a person-marked subject
xpos=/V.[PZD]/;func=/[cn]subj.*/&morph=/.*Person.([0-9]).*/	#1>#2	#1:morph+=Person=$1
xpos=/V.[PZD]/;func=/[cn]subj.*/;func=/conj/&morph=/.*Person.([0-9]).*/	#1>#2>#3	#1:morph+=Number=Plur|Person=$1
xpos=/V.[PZD]/&func=/cop|aux.*/;func=/[cn]subj.*/&morph=/.*Number.Plur.*/;text=/.*/	#3>#2;#3>#1	#1:morph+=Number=Plur
xpos=/V.[PZD]/&func=/cop|aux.*/;func=/[cn]subj.*/&morph=/.*Person.([0-9]).*/;text=/.*/	#3>#2;#3>#1	#1:morph+=Person=$1
xpos=/VBZ/	none	#1:morph+=Number=Sing|Person=3
# VBP mistakenly labeled 3 Sing must be Plur
xpos=/VBP/&morph=/Sing.*3/	none	#1:morph+=Number=Plur

# Imperative
xpos=/VB/;func=/.*subj.*/	#1>#2	#1:storage=hassubj
xpos=/VB/;func=/aux.*/&xpos=/VBP/	#1>#2	#1:storage+=hasfinaux
xpos=/VB/;func=/mark/&xpos=/TO/	#1>#2	#1:storage+=hasto
xpos=/.*/;func=/.*subj.*/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:storage+=hassubj
xpos=/.*/;func=/aux.*/&xpos=/VBP/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:storage+=hasfinaux
xpos=/VB/;func=/mark/&xpos=/TO/;xpos=/VB/&func=/conj/	#1>#2;#1>#3	#3:storage+=hasto
xpos=/VB/&storage!=/has.*/&func=/root|conj|parataxis|ccomp/	none	#1:morph+=Mood=Imp|Person=2|VerbForm=Fin
xpos=/VB/&storage!=/has.*/&func=/aux/&lemma=/do/;func=/advmod/&lemma=/n.?t/	#1>#2	#1:morph+=Mood=Imp|Person=2|VerbForm=Fin
xpos=/VB/&morph!=/.*Mood.Imp.*/	none	#1:morph+=VerbForm=Inf
# Infinitive matrix clause root in non imp s_type
func=/root|parataxis|conj/&xpos=/VB/&morph=/.*Mood.Imp.*/;#S:s_type=/inf|q|wh|frag|sub|decl/	#2>#1	#1:morph+=Mood=Ind|VerbForm=Inf
morph=/(.*)Mood.[^|]+\|?(.*)/&morph=/.*VerbForm.Inf.*/	none	#1:morph=$1$2
xpos=/VB[PZD]/&morph=/.*Number.([^|]+).*Person.([0-9]).*/;func=/conj/&storage!=/.*hassubj.*/&xpos=/VB[PZD]/	#1>#2	#2:morph+=Number=$1|Person=$2
# Subjectless question
xpos=/VBP/&morph=/.*Number.Sing.*Person.3.*/&storage!=/.*hassubj.*/;#S:s_type=/q|wh/	#2>#1	#1:morph+=Person=2
storage=/has.*/	none	#1:storage=_

# Gerund
xpos=/VBG/	none	#1:morph+=VerbForm=Ger
xpos=/VBG/;lemma=/be/&func=/aux/	#1>#2	#1:morph+=Tense=Pres|VerbForm=Part

# Voice
xpos=/V.*/;func=/aux:pass/	#1>#2	#1:morph+=Voice=Pass

# Abbr
text=/^(US|NASA|NATO|U\.S\.|USI|DH|DAB|UK|IE6|COVID-19|KPA|UNESCO|FTU|LA|VR|MLB|USA|IATA|ROS|CC|IE|OK|ABC|BBC|DSW|NBC|U\.S|KCNA|ACPeds|US-412|WB|CBC|ICI|ISO|JSC|KKK|KSC|PHX|WHO|BART|CNRS|ELI5|FIFA|O\.J\.|NWSC|ROTC|BAFTA|STS-1|US-75|US-169|NEMISIS|STS-133|STS-134|STS-135|NSU|FEDERAL|ANDRILL|AS|AV|CO|CV|CW|DC|FN|GW|JK|KS|LV|MC|NB|NJ|NZ|PC|QC|RA|SC|ST|UC|VM|XP|AFP|AIM|BAK|BBF|BPA|CBS|CEI|CIS|CRA|DBE|DNA|FRS|GIS|GPL|HBO|HIV|IDD|IE9|IFN|IMU|IQA|IRC|JFK|JPL|LIS|LSD|MIT|MSN|MTV|NBA|NFL|NHS|NPP|NSW|NTU|OIR|ROS|RVS|SNY|TUL|UKB|UNC|USD|USS|WTA|XML|ADPL|AIDS|AKMA|B\.A\.|ARES|D\.C\.|DPRK|FFFF|FGCU|HECS|HTML|IOTM|IRIS|K\.C\.|L\.A\.|MASS|MMPI|OSCE|S\.F\.|SETI|TAOM|THEO|U\.N\.|UAAR|WWII|XKCD|DHBs|U\.S\.|BY-SA|CITIC|LIBER|M\.Sc\.|NCLAN|ODIHR|UNMIK|OSU|CC-BY-SA-NC|CBC\.ca|DH+Lib|DH2017|e\.g\.|al\.|etc\.|Mr\.|St\.|i\.e\.|c\.|b\.|Ph\.D\.|Mrs\.|d\.|m\.|p\.|Dr\.|Jr\.|No\.|vs\.|div\.|approx\.|a\.|Ed\.|Mt\.|Op\.|ca\.|cm\.|Ave\.|Cal\.|E\.g\.|Feb\.|Inc\.|Vol\.|a\.m\.|eds\.|p\.m\.|M\.Sc\.|Mlle\.|Prof\.)$/	none	#1:morph+=Abbr=Yes

# Polarity
lemma=/^(?i)(({$negstems}.*)|({$neglemmas})|(no[nt]-.*))$/	none	#1:morph+=Polarity=Neg
lemma=/un.*/&xpos=/JJ.*|RB.*/&lemma!=/unique|under/	none	#1:morph+=Polarity=Neg

# NumForm
xpos=/CD/	none	#1:morph+=NumForm=Word
xpos=/CD/&lemma=/[0-9.,]+/	none	#1:morph+=NumForm=Digit
xpos=/CD/&lemma=/[XIVMCDL]+\.?/	none	#1:morph+=NumForm=Roman
{'fraction_non_alphanumeric': 0.2885557515187145, 'fraction_numerical': 0.027532823829120125, 'mean_word_length': 7.634940778341794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 86, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2934694', 'n_tokens_mistral': 11530, 'n_tokens_neox': 10484, 'n_words': 799}