How to perform phonetic matching in nlp

This recipe helps you perform phonetic matching in nlp

Recipe Objective

How to perform phonetic matching?

Phonetic matching is a module that computes the phonetic key of a string by using different algorithms which are as follows:

Soundex algorithm is used to create the phonetic key of the source string.

nysiis algorithm use the New York State Identification and Intelligence System to create the phonetic key of the source string.

metaphone algorithm used to create the phonetic key of the source string based on "Lawrence Philips Metaphone Algorithm".

demetaphone algorithm is use the double metaphone algorithm to create the phonetic key of the source string based on "Lawrence Philips Metaphone Algorithm"

Step 1 - Import the necessary libraries

import phonetics

Step 2 - Check the Soundex with example

soundex = phonetics.soundex('Rupert') print(soundex)

R01063

Step 3 - Check the Metaphone with example

metaphone = phonetics.metaphone('discrimination') print(metaphone)

TSKMNXN

Step 4 - Check the nysiis with example

nysiis = phonetics.nysiis('Catherine') print(nysiis)

CA

Step 5 - Check the demetaphone with example

demetaphone = phonetics.dmetaphone('My string') print(demetaphone)

('MSTRNK', '')

What Users are saying..

profile image

Ameeruddin Mohammed

ETL (Abintio) developer at IBM
linkedin profile url

I come from a background in Marketing and Analytics and when I developed an interest in Machine Learning algorithms, I did multiple in-class courses from reputed institutions though I got good... Read More

Relevant Projects

Build a Autoregressive and Moving Average Time Series Model
In this time series project, you will learn to build Autoregressive and Moving Average Time Series Models to forecast future readings, optimize performance, and harness the power of predictive analytics for sensor data.

Build Time Series Models for Gaussian Processes in Python
Time Series Project - A hands-on approach to Gaussian Processes for Time Series Modelling in Python

Ecommerce product reviews - Pairwise ranking and sentiment analysis
This project analyzes a dataset containing ecommerce product reviews. The goal is to use machine learning models to perform sentiment analysis on product reviews and rank them based on relevance. Reviews play a key role in product recommendation systems.

Credit Card Fraud Detection as a Classification Problem
In this data science project, we will predict the credit card fraud in the transactional dataset using some of the predictive models.

Personalized Medicine: Redefining Cancer Treatment
In this Personalized Medicine Machine Learning Project you will learn to classify genetic mutations on the basis of medical literature into 9 classes.

Loan Eligibility Prediction using Gradient Boosting Classifier
This data science in python project predicts if a loan should be given to an applicant or not. We predict if the customer is eligible for loan based on several factors like credit score and past history.

Insurance Pricing Forecast Using XGBoost Regressor
In this project, we are going to talk about insurance forecast by using linear and xgboost regression techniques.

Build a Collaborative Filtering Recommender System in Python
Use the Amazon Reviews/Ratings dataset of 2 Million records to build a recommender system using memory-based collaborative filtering in Python.

Build Portfolio Optimization Machine Learning Models in R
Machine Learning Project for Financial Risk Modelling and Portfolio Optimization with R- Build a machine learning model in R to develop a strategy for building a portfolio for maximized returns.

Llama2 Project for MetaData Generation using FAISS and RAGs
In this LLM Llama2 Project, you will automate metadata generation using Llama2, RAGs, and AWS to reduce manual efforts.