Skip to content

Commit

Permalink
auto update SNACS annotations to v2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
nschneid committed Jun 13, 2022
1 parent 98f6d83 commit 2786c8c
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 25 deletions.
6 changes: 3 additions & 3 deletions lexcatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ def compute_lexcat(tokNum, smwe, smweGroupToks, ss, lexlemma, poses, rels):
return '!@'
return upos

def supersenses_for_lexcat(lc):
def supersenses_for_lexcat(lc): # specific to English
if lc=='N': return NSS
if lc=='V' or lc.startswith('V.'):
if lc!='V':
assert lc in {'V.VID', 'V.VPC.full', 'V.VPC.semi', 'V.LVC.full', 'V.LVC.cause', 'V.IAV'},lc # PARSEME 1.1 verbal MWE subtypes
return VSS
if lc in ('P', 'PP', 'INF.P'): return PSS
if lc in ('POSS', 'PRON.POSS'): return PSS | {'`$'}
if lc in ('P', 'PP', 'INF.P'): return (PSS - {'p.Content'})
if lc in ('POSS', 'PRON.POSS'): return (PSS - {'p.Content'}) | {'`$'}

ALL_LEXCATS = {'N', 'PRON', 'V', 'P', 'PP', 'INF', 'INF.P', 'POSS', 'PRON.POSS', 'DISC', 'AUX',
'ADJ', 'ADV', 'DET', 'CCONJ', 'SCONJ', 'INTJ', 'NUM', 'SYM', 'PUNCT', 'X'}
34 changes: 17 additions & 17 deletions streusle.conllulex
Original file line number Diff line number Diff line change
Expand Up @@ -7714,7 +7714,7 @@
# streusle_sent_id = ewtb.r.034813.1
# mwe = Baffled by the one_ - _star reviews
1 Baffled baffle VERB VBN Tense=Past|VerbForm=Part 0 root 0:root _ _ V baffle v.cognition _ _ _ _ O-V-v.cognition
2 by by ADP IN _ 7 case 7:case _ _ P by p.Stimulus p.Causer _ _ _ O-P-p.Stimulus|p.Causer
2 by by ADP IN _ 7 case 7:case _ _ P by p.Stimulus p.Force _ _ _ O-P-p.Stimulus|p.Force
3 the the DET DT Definite=Def|PronType=Art 7 det 7:det _ _ DET the _ _ _ _ _ O-DET
4 one one NUM CD NumType=Card 6 nummod 6:nummod SpaceAfter=No 1:1 N one star n.COMMUNICATION _ _ _ _ B-N-n.COMMUNICATION
5 - - PUNCT HYPH _ 6 punct 6:punct SpaceAfter=No _ PUNCT - _ _ _ _ _ o-PUNCT
Expand Down Expand Up @@ -20437,7 +20437,7 @@
1 Once once SCONJ IN _ 3 mark 3:mark _ _ SCONJ once _ _ _ _ _ O-SCONJ
2 they they PRON PRP Case=Nom|Number=Plur|Person=3|PronType=Prs 3 nsubj 3:nsubj _ _ PRON they _ _ _ _ _ O-PRON
3 realized realize VERB VBD Mood=Ind|Tense=Past|VerbForm=Fin 7 advcl 7:advcl:once _ _ V realize v.cognition _ _ _ _ O-V-v.cognition
4 their they PRON PRP$ Number=Plur|Person=3|Poss=Yes|PronType=Prs 5 nmod:poss 5:nmod:poss _ _ PRON.POSS they p.Causer p.Gestalt _ _ _ O-PRON.POSS-p.Causer|p.Gestalt
4 their they PRON PRP$ Number=Plur|Person=3|Poss=Yes|PronType=Prs 5 nmod:poss 5:nmod:poss _ _ PRON.POSS they p.Force p.Gestalt _ _ _ O-PRON.POSS-p.Force|p.Gestalt
5 mistake mistake NOUN NN Number=Sing 3 obj 3:obj _ _ N mistake n.EVENT _ _ _ _ O-N-n.EVENT
6 they they PRON PRP Case=Nom|Number=Plur|Person=3|PronType=Prs 7 nsubj 7:nsubj|19:nsubj _ _ PRON they _ _ _ _ _ O-PRON
7 sent send VERB VBD Mood=Ind|Tense=Past|VerbForm=Fin 0 root 0:root _ _ V send v.motion _ _ _ _ O-V-v.motion
Expand Down Expand Up @@ -24022,7 +24022,7 @@
9 was be AUX VBD Mood=Ind|Number=Sing|Person=3|Tense=Past|VerbForm=Fin 11 aux:pass 11:aux:pass _ _ AUX be _ _ _ _ _ O-AUX
10 immediately immediately ADV RB _ 11 advmod 11:advmod _ _ ADV immediately _ _ _ _ _ O-ADV
11 impressed impress VERB VBN Tense=Past|VerbForm=Part 1 conj 1:conj:and _ _ V impress v.cognition _ _ _ _ O-V-v.cognition
12 by by ADP IN _ 14 case 14:case _ _ P by p.Stimulus p.Causer _ _ _ O-P-p.Stimulus|p.Causer
12 by by ADP IN _ 14 case 14:case _ _ P by p.Stimulus p.Force _ _ _ O-P-p.Stimulus|p.Force
13 their they PRON PRP$ Number=Plur|Person=3|Poss=Yes|PronType=Prs 14 nmod:poss 14:nmod:poss _ _ PRON.POSS they p.Gestalt p.Gestalt _ _ _ O-PRON.POSS-p.Gestalt
14 professionalism professionalism NOUN NN Number=Sing 11 obl 11:obl:by _ _ N professionalism n.ATTRIBUTE _ _ _ _ O-N-n.ATTRIBUTE
15 ( ( PUNCT -LRB- _ 16 punct 16:punct SpaceAfter=No _ PUNCT ( _ _ _ _ _ O-PUNCT
Expand Down Expand Up @@ -24470,7 +24470,7 @@
11 pies pie NOUN NNS Number=Plur 8 appos 8:appos SpaceAfter=No _ N pie n.FOOD _ _ _ _ O-N-n.FOOD
12 , , PUNCT , _ 11 punct 11:punct _ _ PUNCT , _ _ _ _ _ O-PUNCT
13 sold sell VERB VBN Tense=Past|VerbForm=Part 11 acl 11:acl _ _ V sell v.possession _ _ _ _ O-V-v.possession
14 by by ADP IN _ 16 case 16:case _ _ P by p.RateUnit p.RateUnit _ _ _ O-P-p.RateUnit
14 by by ADP IN _ 16 case 16:case _ _ P by p.SetIteration p.SetIteration _ _ _ O-P-p.SetIteration
15 the the DET DT Definite=Def|PronType=Art 16 det 16:det _ _ DET the _ _ _ _ _ O-DET
16 slice slice NOUN NN Number=Sing 13 obl 13:obl:by SpaceAfter=No _ N slice n.FOOD _ _ _ _ O-N-n.FOOD
17 , , PUNCT , _ 11 punct 11:punct _ _ PUNCT , _ _ _ _ _ O-PUNCT
Expand Down Expand Up @@ -26865,7 +26865,7 @@
29 dental dental ADJ JJ Degree=Pos 30 amod 30:amod _ _ ADJ dental _ _ _ _ _ O-ADJ
30 work work NOUN NN Number=Sing 16 parataxis 16:parataxis _ _ N work n.ACT _ _ _ _ O-N-n.ACT
31 underpinned underpin VERB VBN Tense=Past|VerbForm=Part 30 acl 30:acl _ _ V underpin v.stative _ _ _ _ O-V-v.stative
32 by by ADP IN _ 35 case 35:case _ _ P by p.Causer p.Causer _ _ _ O-P-p.Causer
32 by by ADP IN _ 35 case 35:case _ _ P by p.Force p.Force _ _ _ O-P-p.Force
33 a a DET DT Definite=Ind|PronType=Art 35 det 35:det _ _ DET a _ _ _ _ _ O-DET
34 strong strong ADJ JJ Degree=Pos 35 amod 35:amod _ _ ADJ strong _ _ _ _ _ O-ADJ
35 duty duty NOUN NN Number=Sing 31 obl 31:obl:by _ _ N duty n.COGNITION _ _ _ _ O-N-n.COGNITION
Expand Down Expand Up @@ -36985,7 +36985,7 @@
13 be be AUX VB Mood=Imp|VerbForm=Fin 14 aux:pass 14:aux:pass _ _ AUX be _ _ 2:1 _ be put off by B-AUX
14 put put VERB VBN Tense=Past|VerbForm=Part|Voice=Pass 4 parataxis 4:parataxis _ 3:1 V.VPC.full put off v.emotion _ 2:2 _ _ I~-V.VPC.full-v.emotion
15 off off ADP RP _ 14 compound:prt 14:compound:prt _ 3:2 _ _ _ _ 2:3 _ _ I_
16 by by ADP IN _ 20 case 20:case _ _ P by p.Stimulus p.Causer 2:4 _ _ I~-P-p.Stimulus|p.Causer
16 by by ADP IN _ 20 case 20:case _ _ P by p.Stimulus p.Force 2:4 _ _ I~-P-p.Stimulus|p.Force
17 the the DET DT Definite=Def|PronType=Art 20 det 20:det _ _ DET the _ _ _ _ _ O-DET
18 one one NUM CD NumType=Card 20 nummod 20:nummod _ _ NUM one _ _ _ _ _ O-NUM
19 negative negative ADJ JJ Degree=Pos 20 amod 20:amod _ _ ADJ negative _ _ _ _ _ O-ADJ
Expand Down Expand Up @@ -42499,7 +42499,7 @@
68 IS be AUX VBZ Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin 70 cop 70:cop _ _ V be v.stative _ _ _ _ O-V-v.stative
69 SO so ADV RB _ 70 advmod 70:advmod _ _ ADV so _ _ _ _ _ O-ADV
70 HIGH high ADJ JJ Degree=Pos 66 acl:relcl 66:acl:relcl _ _ ADJ high _ _ _ _ _ O-ADJ
71 FROM from ADP IN _ 75 case 75:case _ _ P from p.Causer p.Source _ _ _ O-P-p.Causer|p.Source
71 FROM from ADP IN _ 75 case 75:case _ _ P from p.Force p.Source _ _ _ O-P-p.Force|p.Source
72 THE the DET DT Definite=Def|PronType=Art 75 det 75:det _ _ DET the _ _ _ _ _ O-DET
73 SECOND second ADJ JJ Degree=Pos|NumType=Ord 74 amod 74:amod _ 2:1 N second hand smoke n.SUBSTANCE _ _ _ _ B-N-n.SUBSTANCE
74 HAND hand NOUN NN Number=Sing 75 compound 75:compound _ 2:2 _ _ _ _ _ _ _ I_
Expand Down Expand Up @@ -45429,7 +45429,7 @@
9 a a DET DT Definite=Ind|PronType=Art 11 det 11:det _ _ DET a _ _ _ _ _ O-DET
10 certain certain ADJ JJ Degree=Pos 11 amod 11:amod _ _ ADJ certain _ _ _ _ _ O-ADJ
11 amount amount NOUN NN Number=Sing 8 obj 8:obj _ _ N amount n.POSSESSION _ _ _ _ O-N-n.POSSESSION
12 per per ADP IN _ 13 case 13:case _ _ P per p.RateUnit p.RateUnit _ _ _ O-P-p.RateUnit
12 per per ADP IN _ 13 case 13:case _ _ P per p.SetIteration p.SetIteration _ _ _ O-P-p.SetIteration
13 person person NOUN NN Number=Sing 11 nmod 11:nmod:per SpaceAfter=No _ N person n.PERSON _ _ _ _ O-N-n.PERSON
14 , , PUNCT , _ 20 punct 20:punct _ _ PUNCT , _ _ _ _ _ O-PUNCT
15 and and CCONJ CC _ 20 cc 20:cc _ _ CCONJ and _ _ _ _ _ O-CCONJ
Expand Down Expand Up @@ -51837,7 +51837,7 @@
2 'm be AUX VBP Mood=Ind|Tense=Pres|VerbForm=Fin 4 aux:pass 4:aux:pass _ _ AUX be _ _ _ _ _ O-AUX
3 really really ADV RB _ 4 advmod 4:advmod _ _ ADV really _ _ _ _ _ O-ADV
4 surprised surprise VERB VBN Tense=Past|VerbForm=Part 0 root 0:root _ _ V surprise v.cognition _ _ _ _ O-V-v.cognition
5 by by ADP IN _ 8 case 8:case _ _ P by p.Stimulus p.Causer _ _ _ O-P-p.Stimulus|p.Causer
5 by by ADP IN _ 8 case 8:case _ _ P by p.Stimulus p.Force _ _ _ O-P-p.Stimulus|p.Force
6 the the DET DT Definite=Def|PronType=Art 8 det 8:det _ _ DET the _ _ _ _ _ O-DET
7 negative negative ADJ JJ Degree=Pos 8 amod 8:amod _ _ ADJ negative _ _ _ _ _ O-ADJ
8 reviews review NOUN NNS Number=Plur 4 obl 4:obl:by SpaceAfter=No _ N review n.COMMUNICATION _ _ _ _ O-N-n.COMMUNICATION
Expand Down Expand Up @@ -52609,7 +52609,7 @@
24 reap reap VERB VB VerbForm=Inf 13 conj 4:ccomp|13:conj:and _ _ V reap v.possession _ _ _ _ O-V-v.possession
25 the the DET DT Definite=Def|PronType=Art 26 det 26:det _ _ DET the _ _ _ _ _ O-DET
26 rewards reward NOUN NNS Number=Plur 24 obj 24:obj _ _ N reward n.COGNITION _ _ _ _ O-N-n.COGNITION
27 of of ADP IN _ 29 case 29:case _ _ P of p.Causer p.Causer _ _ _ O-P-p.Causer
27 of of ADP IN _ 29 case 29:case _ _ P of p.Force p.Force _ _ _ O-P-p.Force
28 this this DET DT Number=Sing|PronType=Dem 29 det 29:det _ _ DET this _ _ _ _ _ O-DET
29 program program NOUN NN Number=Sing 26 nmod 26:nmod:of SpaceAfter=No _ N program n.GROUP _ _ _ _ O-N-n.GROUP
30 . . PUNCT . _ 4 punct 4:punct _ _ PUNCT . _ _ _ _ _ O-PUNCT
Expand Down Expand Up @@ -54724,7 +54724,7 @@
6 and and CCONJ CC _ 8 cc 8:cc _ _ CCONJ and _ _ _ _ _ O-CCONJ
7 was be AUX VBD Mood=Ind|Number=Sing|Person=1|Tense=Past|VerbForm=Fin 8 aux:pass 8:aux:pass _ _ AUX be _ _ _ _ _ O-AUX
8 impressed impress VERB VBN Tense=Past|VerbForm=Part|Voice=Pass 3 conj 3:conj:and _ _ V impress v.cognition _ _ _ _ O-V-v.cognition
9 by by ADP IN _ 11 mark 11:mark _ _ P by p.Stimulus p.Causer _ _ _ O-P-p.Stimulus|p.Causer
9 by by ADP IN _ 11 mark 11:mark _ _ P by p.Stimulus p.Force _ _ _ O-P-p.Stimulus|p.Force
10 how how ADV WRB PronType=Int 11 advmod 11:advmod _ _ ADV how _ _ _ _ _ O-ADV
11 clean clean ADJ JJ Degree=Pos 8 advcl 8:advcl:by _ _ ADJ clean _ _ _ _ _ O-ADJ
12 the the DET DT Definite=Def|PronType=Art 13 det 13:det _ _ DET the _ _ _ _ _ O-DET
Expand Down Expand Up @@ -55170,7 +55170,7 @@
# streusle_sent_id = ewtb.r.291046.3
# mwe = Victim of hard_times and I suspect failing corporate management .
1 Victim victim NOUN NN Number=Sing 0 root 0:root _ _ N victim n.PERSON _ _ _ _ O-N-n.PERSON
2 of of ADP IN _ 4 case 4:case _ _ P of p.Causer p.Causer _ _ _ O-P-p.Causer
2 of of ADP IN _ 4 case 4:case _ _ P of p.Force p.Force _ _ _ O-P-p.Force
3 hard hard ADJ JJ Degree=Pos 4 amod 4:amod _ 1:1 N hard time n.STATE _ _ _ _ B-N-n.STATE
4 times time NOUN NNS Number=Plur 1 nmod 1:nmod:of _ 1:2 _ _ _ _ _ _ _ I_
5 and and CCONJ CC _ 10 cc 10:cc _ _ CCONJ and _ _ _ _ _ O-CCONJ
Expand Down Expand Up @@ -58546,7 +58546,7 @@
13 a a DET DT Definite=Ind|PronType=Art 14 det 14:det _ 1:1 DET a bit _ _ _ _ _ B-DET
14 bit bit NOUN NN Number=Sing 15 obl:npmod 15:obl:npmod _ 1:2 _ _ _ _ _ _ _ I_
15 surprised surprised ADJ JJ Degree=Pos 9 parataxis 9:parataxis _ _ ADJ surprised _ _ _ _ _ O-ADJ
16 by by ADP IN _ 18 case 18:case _ _ P by p.Stimulus p.Causer _ _ _ O-P-p.Stimulus|p.Causer
16 by by ADP IN _ 18 case 18:case _ _ P by p.Stimulus p.Force _ _ _ O-P-p.Stimulus|p.Force
17 other other ADJ JJ Degree=Pos 18 amod 18:amod _ _ ADJ other _ _ _ _ _ O-ADJ
18 comments comment NOUN NNS Number=Plur 15 obl 15:obl:by SpaceAfter=No _ N comment n.COMMUNICATION _ _ _ _ O-N-n.COMMUNICATION
19 . . PUNCT . _ 9 punct 9:punct _ _ PUNCT . _ _ _ _ _ O-PUNCT
Expand Down Expand Up @@ -61091,7 +61091,7 @@
35 only only ADV RB _ 37 advmod 37:advmod _ _ ADV only _ _ _ _ _ O-ADV
36 70 70 NUM CD NumType=Card 37 nummod 37:nummod SpaceAfter=No _ NUM 70 _ _ _ _ _ O-NUM
37 p p NOUN NN Number=Sing 31 obl 31:obl:for _ _ N p n.POSSESSION _ _ _ _ O-N-n.POSSESSION
38 per per ADP IN _ 39 case 39:case _ _ P per p.RateUnit p.RateUnit _ _ _ O-P-p.RateUnit
38 per per ADP IN _ 39 case 39:case _ _ P per p.SetIteration p.SetIteration _ _ _ O-P-p.SetIteration
39 unit unit NOUN NN Number=Sing 37 nmod 37:nmod:per SpaceAfter=No _ N unit n.ARTIFACT _ _ _ _ O-N-n.ARTIFACT
40 . . PUNCT . _ 2 punct 2:punct _ _ PUNCT . _ _ _ _ _ O-PUNCT

Expand Down Expand Up @@ -65339,7 +65339,7 @@
8 slang slang NOUN NN Number=Sing 10 nsubj:pass 10:nsubj:pass|13:nsubj:pass _ _ N slang n.COMMUNICATION _ _ _ _ O-N-n.COMMUNICATION
9 is be AUX VBZ Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin 10 aux:pass 10:aux:pass _ _ AUX be _ _ _ _ _ O-AUX
10 influenced influence VERB VBN Tense=Past|VerbForm=Part|Voice=Pass 2 ccomp 2:ccomp _ _ V influence v.cognition _ _ _ _ O-V-v.cognition
11 by by ADP IN _ 15 case 15:case _ _ P by p.Causer p.Causer _ _ _ O-P-p.Causer
11 by by ADP IN _ 15 case 15:case _ _ P by p.Force p.Force _ _ _ O-P-p.Force
12 and and CCONJ CC _ 13 cc 13:cc _ _ CCONJ and _ _ _ _ _ O-CCONJ
13 has have VERB VBZ Mood=Ind|Number=Sing|Person=3|Tense=Pres|VerbForm=Fin 10 conj 2:ccomp|10:conj:and _ _ V have v.stative _ _ _ _ O-V-v.stative
14 Jamaican jamaican ADJ JJ Degree=Pos 15 amod 15:amod _ _ ADJ jamaican _ _ _ _ _ O-ADJ
Expand Down Expand Up @@ -70516,7 +70516,7 @@
19 you you PRON PRP Case=Acc|Person=2|PronType=Prs 18 iobj 18:iobj _ _ PRON you _ _ _ _ _ O-PRON
20 $ $ SYM $ _ 18 obj 18:obj SpaceAfter=No _ SYM $ _ _ _ _ _ O-SYM
21 1.50 1.50 NUM CD NumType=Card 20 nummod 20:nummod _ _ NUM 1.50 _ _ _ _ _ O-NUM
22 per per ADP IN _ 23 case 23:case _ _ P per p.RateUnit p.RateUnit _ _ _ O-P-p.RateUnit
22 per per ADP IN _ 23 case 23:case _ _ P per p.SetIteration p.SetIteration _ _ _ O-P-p.SetIteration
23 can can NOUN NN Number=Sing 20 nmod 20:nmod:per SpaceAfter=No _ N can n.ARTIFACT _ _ _ _ O-N-n.ARTIFACT
24 . . PUNCT . _ 18 punct 18:punct _ _ PUNCT . _ _ _ _ _ O-PUNCT

Expand Down Expand Up @@ -70557,7 +70557,7 @@
15 you you PRON PRP Case=Acc|Person=2|PronType=Prs 14 iobj 14:iobj _ _ PRON you _ _ _ _ _ O-PRON
16 $ $ SYM $ _ 14 obj 14:obj SpaceAfter=No _ SYM $ _ _ _ _ _ O-SYM
17 8 8 NUM CD NumType=Card 16 nummod 16:nummod _ _ NUM 8 _ _ _ _ _ O-NUM
18 per per ADP IN _ 19 case 19:case _ _ P per p.RateUnit p.RateUnit _ _ _ O-P-p.RateUnit
18 per per ADP IN _ 19 case 19:case _ _ P per p.SetIteration p.SetIteration _ _ _ O-P-p.SetIteration
19 item item NOUN NN Number=Sing 16 nmod 16:nmod:per SpaceAfter=No _ N item n.ARTIFACT _ _ _ _ O-N-n.ARTIFACT
20 . . PUNCT . _ 14 punct 14:punct _ _ PUNCT . _ _ _ _ _ O-PUNCT

Expand Down
16 changes: 11 additions & 5 deletions supersenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
'v.perception', 'v.possession', 'v.social', 'v.stative'}

# Adposition (preposition/postposition) and case supersenses
# As of SNACS v2.5 guidelines, for STREUSLE v4.3
# As of SNACS v2.6 guidelines, for STREUSLE v4.5

PSS_TREE = {
'p.Circumstance': {
Expand All @@ -48,10 +48,12 @@
'p.Explanation': {
'p.Purpose': {}}},
'p.Participant': {
'p.Causer': {
'p.Causer': {},
'p.Force': {
'p.Agent': {}},
'p.Theme': {
'p.Topic': {}},
'p.Topic': {},
'p.Content': {}},
'p.Ancillary': {},
'p.Stimulus': {},
'p.Experiencer': {},
Expand All @@ -77,7 +79,7 @@
'p.Approximator': {}}},
'p.Ensemble': {},
'p.ComparisonRef': {},
'p.RateUnit': {},
'p.SetIteration': {},
'p.SocialRel': {}},
}

Expand All @@ -94,7 +96,7 @@

PSS = set(PSS_PARENTS.keys())

assert len(PSS_DEPTH)==len(PSS)==50
assert len(PSS_DEPTH)==len(PSS)==52
assert max(PSS_DEPTH.values())==4
assert min(PSS_DEPTH.values())==1

Expand All @@ -112,6 +114,10 @@
'Transit', 'Traversed', 'Value', 'ValueComparison', 'Via'}

# Note also that Part/Portion was renamed to PartPortion in STREUSLE 4.1
# In SNACS 2.6/STREUSLE 4.5:
# - RateUnit was renamed to SetIteration
# - old Causer was renamed to Force, but Causer remains in the hierarchy with a new meaning
# - added: Content (but not for English)

def coarsen_pss(ss, depth):
coarse = ss
Expand Down

0 comments on commit 2786c8c

Please sign in to comment.