Some API changes to make it easier to access docs.
Currently
# Iterate documents
for (docid, doc) in corpus.docs:
print(docid)
# Get document by ID
doc = corpus.doc_by_id('abcd')
# Get nth document
doc = corpus.doc_by_id(corpus.doc_ids[10])
Change to
# Iterate documents
for doc in corpus.docs:
print(doc.id)
# Get document by ID
doc = corpus['abcd']
# Get nth document
doc = corpus[10]
Some API changes to make it easier to access docs.
Currently
Change to