All Courses

Python - Text Processing Environment

Neha Kumawat

a year ago

Text Processing Environment in Python | Insideaiml
Table of Content
  • Getting Python
  • Installing Python
  • Setting up the PATH
  • Python Environment Variables
  • Running Python
  • Installing NLTK Pack
           To effectively make and run the model code in this instructional exercise we will require a situation set up which will have both broadly useful python just as the unique bundles required for Data Science. We will initially look at introducing the broadly useful python which can be python 2 or python 3. In any case, we will favor python 2 for this instructional exercise for the most part in light of its development and more extensive help of outer bundles.

Getting Python

       The most modern and current source code, pairs, documentation, news, and so on., is accessible on the official site of Python https://www.python.org/
You can download Python documentation from https://www.python.org/doc/. The documentation is accessible in HTML, PDF, and PostScript groups.
    
Recommended blog for you : Python - Getting Started   

Installing Python

Python Installation | Insideaiml
          Python appropriation is accessible for a wide assortment of stages. You have to download just the paired code material for your foundation and introduce Python.
In the event that the paired code for your foundation isn't accessible, you need a C compiler to order the source code physically. Gathering the source code offers greater adaptability regarding the selection of highlights that you require in your establishment.
Here is a snappy diagram of introducing Python on different stages −

Unix and Linux Installation

Here are the basic steps to introduce Python on Unix/Linux machine.
Download Zip file | insideaiml
  • Download and concentrate records.
  • Download and concentrate documents.
  • Altering the Modules/Setup document on the off chance that you need to modify a few alternatives.
  • run ./arrange content
  • make
  • make introduce
This introduces Python at standard area/usr/nearby/receptacle and its libraries at/usr/neighborhood/lib/pythonXX where XX is the form of Python.

Windows Installation

 Steps to install Python on the Windows machine.
Python Windows Setup download page | insideaiml
  • Select x86/x64 bit version based on your machine
  • Download python XYZ msi Windows installer file where XYZ is the version you need to install.
 Windows Installer File | insideaiml
  • Save the installer file to your local machine.
  • Run the downloaded file. Python install wizard open.
  • On the first screen, enable the “Add Python 3.8 to PATH” option and then click on the “Install Now” option.
Install Python Setup | insideaiml
Python Install Successfully | insideaiml

Macintosh Installation

  Open a new browser window and visit the https://www.python.org/downloads/
Download Page | insideaiml
Run the installer
Python Installer | insideaiml
Agree to the license and continue the installation.
Finally Installation was completed.
Install successfully | insideaiml
Recommended blog for you : Python 3 - Overview    

Setting up the PATH

Add Python to Path | Insideaiml
            Projects and other executable records can be in many indexes, so functional frameworks provide a hunting method that rundowns the catalogs that the OS looks for executables.
The way is put away in a situation variable, which is a named string kept up by the working framework. Another shell and project can access the variable contain data.
The way factor is named PATH in Unix or Path in Windows (Unix is case sensitive; Windows is not).
In Mac OS, the installer manages to trick it. To configure a Python mediator from a specific catalog, you must add a Python register to your path.

To Set path at Unix/Linux

The path to add the Python directory in Unix −
  • open csh shell and type -  setenv PATH "$PATH:/usr/local/bin/python" and press the Enter button..
  •  In the bash shell (Linux) and type - export PATH="$PATH:/usr/local/bin/python" and press the Enter button.
  • In the sh or ksh shell and type - PATH="$PATH:/usr/local/bin/python" and press the Enter button.

The setting path at Windows

The path to add the Python directory in Windows  −
open command prompt and type  -  path %path%;C:\Python and press the Enter button.

Python Environment Variables

Python Environment Variables | Insideaiml

Running Python

Following are the ways to start Python −

Interactive Interpreter

    You can begin Python from Unix, DOS, or whatever another framework that gives you an order line mediator or shell window.
Enter python the order line.
Begin coding immediately in the intuitive mediator..

$python # Unix/Linux
or
python% # Unix/Linux
or
C:> python # Windows/DOS
Here is the list of all the available command-line options −
command-line options | Insideaiml

Script from the Command-line

A Python content can be executed at order line by conjuring the translator on your application, as in the accompanying −

$python script.py # Unix/Linux

or

python% script.py # Unix/Linux

or 

C: >python script.py # Windows/DOS
Note −  Make sure that the file permission mode is enabled.

Integrated Development Environment

Python IDEs for Linux/Windows/Macintosh
  • IDLE
  • PyCharm
  • Vim
  • Visual Studio Code
  • Spyders 
  • Pyzo 
  • PyDev (Eclipse)
  •  Wing IDE
  • Atom
  • IntelliJ IDEA

Installing NLTK Pack

        NLTK is extremely straight forward to coordinate into the python condition. Utilize the beneath order to add NLTK to nature.
sudo pip install -U nltk
The expansion of different libraries will be examined in every part as and when we require their utilization in the python program.
Like the Blog, then Share it with your friends and colleagues to make this AI community stronger. 
To learn more about nuances of Artificial Intelligence, Python Programming, Deep Learning, Data Science and Machine Learning, visit our insideAIML blog page.
Keep Learning. Keep Growing
Recommended Course for you :
Recommended blogs for you :

Submit Review