Python NLTK: Stemming & Lemmatization [Natural Language Processing (NLP)]

This article shows how you can do Stemming and Lemmatisation on your text using NLTK. You can read about introduction to NLTK in this article: Introduction to NLP & NLTK The main goal of stemming and lemmatization is to convert related words to a common base/root word. It’s a special case of text normalization. STEMMING … Read more

Python NLTK: Stop Words [Natural Language Processing (NLP)]

This article shows how you can use the default Stopwords corpus present in Natural Language Toolkit (NLTK). To use stopwords corpus, you have to download it first using the NLTK downloader. In my previous article on Introduction to NLP & NLTK, I have written about downloading and basic usage example of different NLTK corpus data. … Read more

Natural Language Processing (NLP): Basic Introduction to NLTK [Python]

Natural Language Processing (NLP) is about the processing of natural language by computer. It’s about making computer/machine understand about natural language. Natural language means the language that humans speak and understand. Natural Language Toolkit (NLTK) is a suite of Python libraries for Natural Language Processing (NLP). NLTK contains different text processing libraries for classification, tokenization, … Read more

Bubble Sort implementation in Python [Data Structures & Algorithms]

This article deals with implementing Bubble Sort algorithm using Python programming language. Bubble Sort is a simple sorting algorithm that compares each element in the list with its adjacent element and sort that pair of elements if they are not in order. There can be multiple iterations while sorting. Each iteration can be named as … Read more

Hash Table implementation in Python [Data Structures & Algorithms]

This article deals with implementing Hash Table using Python programming language. Hash Table is a data structure where data are stored in an associative manner (in key, value format). The key/index is unique. This kind of storage makes it easier to find the data later on. Hash Table stores data into an array format. It … Read more

Binary Search implementation in Python [Data Structures & Algorithms]

This article deals with the binary search algorithm implementation in Python programming language. Binary search is an improvement to linear search. Binary search requires the searched list to be an ordered list, i.e. the list items should be sorted in ascending order (increasing order). Binary Search This algorithm is a good example of Divide and … Read more

Linear Search implementation in Python [Data Structures & Algorithms]

This article deals with the linear search or sequential search algorithm. It’s a very simple search algorithm. Linear Search In the linear search algorithm: We start searching a list for a particular value from the first item in the list. We move from item to item from the first item to the last item in … Read more

Magento: Get Custom Options & Configurable Product’s Options on Shopping Cart

This article shows how you can get custom options values and configurable options values in shopping cart page in Magento 1.x. We use the checkout session quote collection for this purpose. Here’s the full code: // Get visible items collection in shopping cart $itemsCollection = Mage::getSingleton('checkout/session') ->getQuote() ->getAllVisibleItems(); foreach ($itemsCollection as $item) { // Get … Read more

Magento 2: Unlock Reindex Process via Command Line

This article shows how you can unlock the locked reindexing process Magento 2 via command line. Problem Sometimes a scenario comes when the indexing process gets locked at the time of reindexing. When the process or the index type is locked then you cannot reindex that particular locked index type. The reindex will always skip … Read more