def pd_example(): """ Get all sentences with a potential single-word Possessive Dative, then create an annotation file for each combination of verb and argument type (e.g. "break" with a pronoun argument) """ pd = PossessiveDativeOneWord() pd.process_many(d) b = ByAttributeAnnotation("Verbs", sentences=pd.sentences, attributes=["verb", "argument"]) b.write("/tmp/annotations") return pd
def pds_from_verb_list(): """ Get all Possessive Dative sentences that have one of the verbs in the candidate list as their main verb. """ fname = os.path.join(data_dir, "possessive_dative_verbs.csv") r = csv.reader(codecs.open(fname, "rU")) verbs = [x[0].decode("utf8") for x in r] q = QuickDativePredicatesClass(verbs)() q.process_many(d) b = ByAttributeAnnotation("Verbs", sentences=q.sentences, attributes=["lemma", "argument"]) b.write("/tmp/annotations") return q