所以,我想知道是否有人知道如何在NLTK 的标记器中组合多个术语以创建单个术语。.
例如,当我这样做时:
nltk.pos_tag(nltk.word_tokenize('Apple Incorporated is the largest company'))
它给了我:
[('Apple', 'NNP'), ('Incorporated', 'NNP'), ('is', 'VBZ'), ('the', 'DT'), ('largest', 'JJS'), ('company', 'NN')]
我如何使它将“Apple”和“Incorporated”放在一起('Apple Incorporated','NNP')