Trying to add tags to Word's in a Sentence (using pattern.en lib)... Is this the correct way ? Doesn't seem to be correct, because I get "//PRD" instead "/PRD" and also the other words get messed up "//O" ?
:s[0]
: Sentence('Flying/NNP/B-NP/B-PNP/NP-SBJ-1/O/ planes/NNS/I-NP/B-PNP/NP-SBJ-1/O/ are/VBP/B-VP/B-PNP/VP-1/O/ dangerous/JJ/B-ADJP/B-PNP/O/O/')
: s[0][0]
: Word(u'Flying/NNP')
: s[0][0].custom_tags['dep'] = 'XXX'
: s[0]
: Sentence('Flying/NNP/B-NP/B-PNP/NP-SBJ-1/O//XXX planes/NNS/I-NP/B-PNP/NP-SBJ-1/O//O are/VBP/B-VP/B-PNP/VP-1/O//O dangerous/JJ/B-ADJP/B-PNP/O/O//O')
Aucun commentaire:
Enregistrer un commentaire