April 2018
Beginner
552 pages
13h 58m
English
import numpy as np from nltk.corpus import brown from chunking import splitter
if __name__=='__main__':
content = ' '.join(brown.words()[:10000])
num_of_words = 2000
num_chunks = []
count = 0
texts_chunk = splitter(content, num_of_words)
for text in texts_chunk:
num_chunk = {'index': count, 'text': text}
num_chunks.append(num_chunk)
count += 1
from sklearn.feature_extraction.text import ...