Skip to content

Commit

Permalink
neaten.py: WH-adverbs attach as advmod not mark (#88)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschneid committed Oct 22, 2022
1 parent 4ce1ea8 commit 89966af
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion not-to-release/tools/neaten.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ def validate_annos(tree):
"PRON":["PRP","PRP$","WP","WP$","DT","WDT","EX","NN"],
"PROPN":["NNP","NNPS"],
"PUNCT":[".",",",":","``","''","-LCB-","-RCB-","-LRB-","-RRB-","-LSB-","-RSB-","NFP","HYPH","GW","SYM"],
"SCONJ":["IN","WRB","VBN","VBG"],
"SCONJ":["IN","VBN","VBG"],
"SYM":["$",",","SYM","NFP","NN","NNS","IN","HYPH"],
"VERB":["VB","VBD","VBG","VBN","VBP","VBZ","NNP"],
"X":["ADD","GW","FW","AFX","NN","NNP","VB","RB","JJ","WP","LS","IN","PRP","WRB","MD","-LRB-","-RRB-"]
Expand Down Expand Up @@ -371,6 +371,9 @@ def flag_dep_warnings(id, tok, pos, upos, lemma, func, parent, parent_lemma, par
if pos == "UH" and func=="advmod":
print("WARN: pos " + pos + " should not normally have function 'advmod'" + inname)

if func == "mark" and lemma in ["when", "how", "where", "why", "whenever", "wherever", "however"]:
print("WARN: WH adverbs should attach as advmod, not mark" + inname)

if pos =="IN" and func=="discourse":
print("WARN: pos " + pos + " should not normally have function 'discourse'" + inname)

Expand Down

0 comments on commit 89966af

Please sign in to comment.