In some cases, it could happen that your source text data has been stored in a plain text (.txt) file. In this type of situation, if you want to do any kind of text analytics, you have to import plain text data into the R environment. In this recipe, you will import plain text data from a .txt file and store it into an object of class text.
Importing unstructured text data from a plain text file
Getting ready
Suppose you have stored a text file containing a newspaper article or several abstracts related to a particular topic. In this example, you will use a text file that contains 10 abstracts retrieved from PubMed by doing a literature search with the keyword term "Deep Learning". The filename is deapLearning.txt...