Skip to content

Commit

Permalink
began implementing clause type tagging
Browse files Browse the repository at this point in the history
  • Loading branch information
rangat committed Jun 8, 2019
1 parent 258ad5e commit b6ffbd6
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions tagger.py
Expand Up @@ -86,14 +86,22 @@ def tagObj(obj):
v_2_after = ""
v_3_after = ""

modals = ['can', 'could', 'may', 'might', 'shall', 'should', 'will', 'would', 'must']
obj['clauseType'] = "Ambiguous"

# Tag Clause Type:
if obj['questType'] == "Relative Clause":
obj['clauseType'] = "Ambiguous"
if obj['questType'] == "Root Question":
if v_1_after in modals:
obj['clauseType'] = "Modal"
else:
obj['clauseType'] = "Finite"

elif obj['questType'] == "Embeded Question":
obj['clauseType'] = "Ambiguous"
else:
obj['clauseType'] = "Ambiguous"

if v_1_after in modals:
obj['clauseType'] = "Modal"
else:
obj['clauseType'] = "Finite"

return obj

def tagList(json:list):
Expand Down

0 comments on commit b6ffbd6

Please sign in to comment.