Quindi, mi chiedevo se qualcuno avesse idea di come combinare più termini per creare un singolo termine nei tagger in NLTK..Come aggiungere parole composte al tagger in NLTK?
Per esempio, quando lo faccio:
nltk.pos_tag(nltk.word_tokenize('Apple Incorporated is the largest company'))
Mi dà:
[('Apple', 'NNP'), ('Incorporated', 'NNP'), ('is', 'VBZ'), ('the', 'DT'), ('largest', 'JJS'), ('company', 'NN')]
Come faccio a farlo mettere 'Apple' e 'incorporata' Insieme per essere ('Apple Incorporated','NNP')
avresti bisogno di un chunker/parser e quindi concatenare i pezzi/frase con '_', quindi appiattire nuovamente la struttura in tuple. – alvas