Text Translation with Google Translate API in Python

Unless you have been hiding under a rock, you have probably used Google Translate on many occasions in your life. Whenever you try to translate a word or a sentence from a certain language to another, it is the Google Translate API which brings you the desired results in the background. Though you can translate anything by simply going to the Google Translate web page, you can also integrate Google Translate API into your web applications or desktop programs. The […]

Read more

Text Classification with BERT Tokenizer and TF 2.0 in Python

This is the 23rd article in my series of articles on Python for NLP. In the previous article of this series, I explained how to perform neural machine translation using seq2seq architecture with Python’s Keras library for deep learning. In this article we will study BERT, which stands for Bidirectional Encoder Representations from Transformers and its application to text classification. BERT is a text representation technique like Word Embeddings. If you have no idea of how word embeddings work, take […]

Read more

Deploying Django Apps to Heroku from GitHub

Introduction Heroku is a popular Platform-as-a-Service (PaaS) that allows developers to run and deploy applications by availing the infrastructure required in terms of hardware and software. This means that we do not have to invest in the hardware and software needed to expose our applications to end-users and this freedom allows us to concentrate on our business logic instead of deployment. In this post, we will outline how to deploy a simple Django application to a Heroku pipeline. It targets […]

Read more

Formatting Strings with the Python Template Class

Introduction Python Templates are used to substitute data into strings. With Templates, we gain a heavily customizable interface for string substitution (or string interpolation). Python already offers many ways to substitute strings, including the recently introduced f-Strings. While it is less common to substitute strings with Templates, its power lies in how we can customize our string formatting rules. In this article, we’ll format strings with Python’s Template class. We’ll then have a look at how we can change the […]

Read more

Bubble Sort in Python

Introduction For most people, Bubble Sort is likely the first sorting algorithm they heard of in their Computer Science course. It’s highly intuitive and easy to “translate” into code, which is important for new software developers so they can ease themselves into turning ideas into a form that can be executed on a computer. However, Bubble Sort is one of the worst-performing sorting algorithms in every case except checking whether the array is already sorted, where it often outperforms more […]

Read more

Selection Sort in Python

Introduction Sorting, although a basic operation, is one of the most important operations a computer should perform. It is a building block in many other algorithms and procedures, such as searching and merging. Knowing different sorting algorithms could help you better understand the ideas behind the different algorithms, as well as help you come up with better algorithms. The Selection Sort algorithm sorts an array by finding the minimum value of the unsorted part and then swapping it with the […]

Read more

Integrating MongoDB with Python Using PyMongo

Introduction In this post, we will dive into MongoDB as a data store from a Python perspective. To that end, we’ll write a simple script to showcase what we can achieve and any benefits we can reap from it. Web applications, like many other software applications, are powered by data. The organization and storage of this data are important as they dictate how we interact with the various applications at our disposal. The kind of data handled can also have […]

Read more

Introduction to Image Processing in Python with OpenCV

Introduction In this tutorial, we are going to learn how we can perform image processing using the Python language. We are not going to restrict ourselves to a single library or framework; however, there is one that we will be using the most frequently, the Open CV library. We will start off by talking a little about image processing and then we will move on to see different applications/scenarios where image processing can come in handy. So, let’s begin! What […]

Read more

Removing Stop Words from Strings in Python

In this article, you are going to see different techniques for removing stop words from strings in Python. Stop words are those words in natural language that have a very little meaning, such as “is”, “an”, “the”, etc. Search engines and other enterprise indexing platforms often filter the stop words while fetching results from the database against the user queries. Stop words are often removed from the text before training deep learning and machine learning models since stop words occur […]

Read more

Grid Search Optimization Algorithm in Python

Introduction In this tutorial, we are going to talk about a very powerful optimization (or automation) algorithm, i.e. the Grid Search Algorithm. It is most commonly used for hyperparameter tuning in machine learning models. We will learn how to implement it using Python, as well as apply it in an actual application to see how it can help us choose the best parameters for our model and improve its accuracy. So let’s start. Prerequisites To follow this tutorial, you should […]

Read more
1 34 35 36 37 38 54