#NEWLINE# def conllesp( ) : #NEWLINE# #INDENT# from nltk.corpus import conll2002 #NEWLINE# de = '\n    .*\n    (\n    de/SP|\n    del/SP\n    )\n    ' #NEWLINE# DE = re . compile ( de , re . VERBOSE ) #NEWLINE# print ( ) #NEWLINE# print ( 'Spanish CoNLL2002: de(ORG, LOC) -- just the first 10 clauses:' ) #NEWLINE# print ( ( '=' * 45 ) ) #NEWLINE# rels = [ rel for doc in conll2002 . chunked_sents ( 'esp.train' ) for rel in extract_rels ( 'ORG' , 'LOC' , doc , corpus = 'conll2002' , pattern = DE ) ] #NEWLINE# for r in rels [ : 10 ] : #NEWLINE# #INDENT# print ( clause ( r , relsym = 'DE' ) ) #NEWLINE# #UNINDENT# print ( )