stephbuon / posextract

Grammatical information extraction methods designed for the analysis of historical and contemporary textual corpora.
MIT License
3 stars 0 forks source link

printed rule match #153

Closed stephbuon closed 1 year ago

stephbuon commented 1 year ago

Save rule-match as object attribute or something

stephbuon commented 1 year ago
from posextract import grammatical_triples

sent = 'He scored his first goal of the 2009–10 season on 17 April 2010 against Blackpool.'

triples = grammatical_triples.extract(sent)

for triple in triples:
    print(triple.rule)