Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Python Natural Language Processing

You're reading from  Python Natural Language Processing

Product type Book
Published in Jul 2017
Publisher Packt
ISBN-13 9781787121423
Pages 486 pages
Edition 1st Edition
Languages
Toc

Table of Contents (13) Chapters close

Preface 1. Introduction 2. Practical Understanding of a Corpus and Dataset 3. Understanding the Structure of a Sentences 4. Preprocessing 5. Feature Engineering and NLP Algorithms 6. Advanced Feature Engineering and NLP Algorithms 7. Rule-Based System for NLP 8. Machine Learning for NLP Problems 9. Deep Learning for NLU and NLG Problems 10. Advanced Tools 11. How to Improve Your NLP Skills 12. Installation Guide

Environment setup for NLTK

I would like to suggest to all my readers that they pull the NLPython repository on GitHub. The repository URL is https://github.com/jalajthanaki/NLPython

I'm using Linux (Ubuntu) as the operating system, so if you are not familiar with Linux, it's better for you to make yourself comfortable with it, because most of the advanced frameworks, such as Apache Hadoop, Apache Spark, Apache Flink, Google TensorFlow, and so on, require a Linux operating system.

The GitHub repository contains instructions on how to install Linux, as well as basic Linux commands which we will use throughout this book. On GitHub, you can also find basic commands for GitHub if you are new to Git as well. The URL is https://github.com/jalajthanaki/NLPython/tree/master/ch1/documentation

I'm providing an installation guide for readers to set up the environment for these chapters. The URL is https://github.com/jalajthanaki/NLPython/tree/master/ch1/installation_guide

Steps for installing nltk are as follows (or you can follow the URL: https://github.com/jalajthanaki/NLPython/blob/master/ch1/installation_guide/NLTK%2BSetup.md):

  1. Install Python 2.7.x manually, but on Linux Ubuntu 14.04, it has already been installed; otherwise, you can check your Python version using the python -V command.
  2. Configure pip for installing Python libraries (https://github.com/jalajthanaki/NLPython/blob/master/ch1/installation_guide/NLTK%2BSetup.md).
  3. Open the terminal, and execute the following command:
 pip install nltk or sudo pip install nltk
  1. Open the terminal, and execute the python command.
  2. Inside the Python shell, execute the import nltk command.

If your nltk module is successfully installed on your system, the system will not throw any messages.

  1. Inside the Python shell, execute the nltk.download() command.
  2. This will open an additional dialog window, where you can choose specific libraries, but in our case, click on All packages, and you can choose the path where the packages reside. Wait till all the packages are downloaded. It may take a long time to download. After completion of the download, you can find the folder named nltk_data at the path specified by you earlier. Take a look at the NLTK Downloader in the following screenshot:
Figure 1.6: NLTK Downloader

This repository contains an installation guide, codes, wiki page, and so on. If readers have questions and queries, they can post their queries on the Gitter group. The Gitter group URL is https://gitter.im/NLPython/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link

You have been reading a chapter from
Python Natural Language Processing
Published in: Jul 2017 Publisher: Packt ISBN-13: 9781787121423
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}