VicinityAnnotator expects a {word: label} dict for its cue_words argument, and no longer requires the label as an argument. The wiki does not agree:
# Typically, entities next to words like say/tell/listen etc. will be PERSON
cue_words = ["say", "indicate", "reply", "claim", "declare", "tell", "answer", "listen"]
VicinityAnnotator("money_detector2", cue_words, "nnp_detector", "PERSON", max_window=2)
Would be nice to fix, since following the wiki throws up unexpected and obscure errors.
VicinityAnnotator
expects a{word: label}
dict for itscue_words
argument, and no longer requires the label as an argument. The wiki does not agree:Would be nice to fix, since following the wiki throws up unexpected and obscure errors.