NLP, Python, Spacy.
already. Following snippet divides the data and shows an example article and its category from the training data. training = [doc for doc in reuters.fileids() if doc.find('training') == 0] testing = [doc for doc in reuters.fileids() if doc.find('test') == 0] print(len(training)) # 7769