ho usato di NLTK ne_chunk
per estrarre entità con nome da un testo:NLTK Chiamato Il riconoscimento delle entità a una lista Python
my_sent = "WASHINGTON -- In the wake of a string of abuses by New York police officers in the 1990s, Loretta E. Lynch, the top federal prosecutor in Brooklyn, spoke forcefully about the pain of a broken trust that African-Americans felt and said the responsibility for repairing generations of miscommunication and mistrust fell to law enforcement."
nltk.ne_chunk(my_sent, binary=True)
Ma io non riesco a capire come salvare queste entità a un elenco? Per esempio. -
print Entity_list
('WASHINGTON', 'New York', 'Loretta', 'Brooklyn', 'African')
Grazie.
Cosa significa 'ne_chunk()' tornare invece? A cosa esattamente sei bloccato? – lenz
possibile duplicato di [Nome entità di riconoscimento con espressione regolare: NLTK] (http://stackoverflow.com/questions/24398536/named-entity-recognition-with-regular-expression-nltk) – alvas
Quando eseguo il codice ottengo un IndexError – MERose