Importing data

In this chapter, we will not look into how to scrap a set of documents from a website or extract them from database. Instead, we will assume that we have already collected them as set of documents and stored them in the .txt file format. Now let's look at two options for loading them. The first option addresses the situation where each document is stored in its own .txt file. The second option addresses the situation where all of the documents are stored in a single file by taking one per line.

Get Machine Learning in Java - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.