Programming Articles

Page 116 of 2547

NLP language models_ What are they_ Example with N-grams

Aaryamaan Kartha
Aaryamaan Kartha
Updated on 27-Mar-2026 572 Views

Language models in NLP are computational models that capture relationships between words and phrases to predict and generate text. They calculate the probability of the next word in a sequence and determine how likely an entire sequence of words is to occur naturally. These models power many everyday applications you use − autocomplete on your phone, grammar checkers, translation tools, and voice assistants. When your keyboard suggests the next word or corrects a typo, it's using probabilistic language models working behind the scenes. This article explores how language models work, focusing on N-gram models − one of the ...

Read More

How to Conduct a Two Sample T-Test in Python?

Sohail Tabrez
Sohail Tabrez
Updated on 27-Mar-2026 2K+ Views

The two-sample t-test is a statistical method used to compare the means of two independent groups to determine if they differ significantly. This test is commonly used in scientific research to analyze whether two groups differ on a continuous variable. In this article, we'll explore how to perform a two-sample t-test in Python using the scipy.stats module. Understanding Two-Sample T-Test Before implementing the test, let's understand the theory. The two-sample t-test assumes that both sample populations are normally distributed with similar variances. The null hypothesis states that the means of the two groups are equal, while the alternative ...

Read More

How to Conduct a One Sample T-Test in Python?

Sohail Tabrez
Sohail Tabrez
Updated on 27-Mar-2026 2K+ Views

A One Sample T-Test is a statistical hypothesis test used to determine whether a population mean is significantly different from a hypothesized value. Python provides the necessary tools through the SciPy library to conduct this test efficiently. Understanding the One Sample T-Test Before performing the test, we need to establish our hypotheses ? Null Hypothesis (H₀): The population mean equals the hypothesized value Alternative Hypothesis (H₁): The population mean does not equal the hypothesized value Step-by-Step Implementation Step 1: Import Required Libraries We need NumPy for data handling and SciPy for statistical ...

Read More

Python Program to Extract Strings between HTML Tags

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 1K+ Views

HTML tags are used to design the skeleton of websites. We pass information and upload content in the form of strings enclosed within the tags. The strings between the HTML tags determines how the element will be displayed and interpreted by the browser. Therefore, the extraction of these strings plays a crucial role in data manipulation and processing. These strings reveal the hidden pattern and logic behind the construction of a webpage. In this article, we will explore different methods to extract strings between HTML tags. Understanding the Problem We have to extract all the strings between ...

Read More

Python Program to Extract String Till First Non-Alphanumeric Character

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 605 Views

Python strings are sequences of characters that represent information or data. A normal string can contain various characters that are enclosed within single or double quotes, but an alphanumeric string only consists of digits and letters. Both alphanumeric and non-alphanumeric strings are used in various scenarios including password protection, data processing, and validation. In this tutorial, we will extract a substring from the beginning of a string until we encounter the first non-alphanumeric character. Understanding the Problem We need to extract a substring from an original string before we encounter a non-alphanumeric character. Let's understand this with ...

Read More

Python program to extract N largest dictionaries keys

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 355 Views

A Python dictionary is a data structure that stores data in key-value pairs, where each value is associated with a unique key. In many scenarios, we need to extract the N largest keys from a dictionary based on their numerical values. This article explores different methods to extract N largest dictionary keys, ranging from basic iteration approaches to more efficient built-in functions. Understanding the Problem Given a dictionary with numeric keys, we need to find and return the N largest keys in descending order. Example # Sample dictionary sample_dict = {12: 10, 22: 12, ...

Read More

Python Program to Extract Mesh Matching Strings

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 216 Views

Pattern recognition is an important programming concept. It allows us to retrieve specific data that satisfies a particular condition or match a particular sequence. This principle is helpful in various fields including language processing and image processing. String matching helps us to extract meaningful information from a large collection of data. In this article, we will be discussing a similar concept of extracting mesh matching strings from a given list of strings. Mesh matching focuses on the extraction of "similar" strings of equal length that follow a specific pattern. Understanding the Problem The main concept is to ...

Read More

Python program to extract key-value pairs with substring in a dictionary

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 1K+ Views

Dictionaries in Python are data structures that store data in the form of key-value pairs. Each key is unique and it is associated with different values. A dictionary helps us to access and retrieve data efficiently allowing a programmer to build optimized code. Specific key-value pairs can be extracted from a given dictionary based on different requirements. This selective item extraction helps us to produce a dictionary consisting of relevant information. In this article, we will be discussing a similar concept of item extraction from a dictionary based on a reference substring. Understanding the Problem We will ...

Read More

Python program to extract dictionary items for custom values

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 218 Views

Custom values are specific values that are defined and selected under certain criteria. In a large and complex dataset, specification is very important for constructing an optimized program and therefore extraction of relevant data becomes very important. We can pass a reference list according to which the values can be extracted. This reference list has its own implications as it stores concise information. In this article we will be discussing a similar concept of extracting dictionary items (both keys and values) for a custom data passed through a list. Understanding the Problem We will create a dictionary ...

Read More

Python program to extract a single value from JSON response

Devesh Chauhan
Devesh Chauhan
Updated on 27-Mar-2026 3K+ Views

Value extraction is a very popular programming concept and it is used in a wide variety of operations. However extracting values from a JSON response is a different concept all together. It helps us to build logic and target specific values in a complex dataset. This article will explain the various methods that can be used to extract a single value from a JSON response. What is a JSON Response? A JSON (JavaScript Object Notation) response is a widely accepted data format through which a server responds to a client's request. Whenever a client requests for certain APIs ...

Read More
Showing 1151–1160 of 25,466 articles
« Prev 1 114 115 116 117 118 2547 Next »
Advertisements