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

Gautam Vermani

Data Consultant at Confidential
linkedin profile url

Having worked in the field of Data Science, I wanted to explore how I can implement projects in other domains, So I thought of connecting with ProjectPro. A project that helped me absorb this topic... Read More

Relevant Projects

Hands-On Approach to Regression Discontinuity Design Python
In this machine learning project, you will learn to implement Regression Discontinuity Design Example in Python to determine the effect of age on Mortality Rate in Python.

Linear Regression Model Project in Python for Beginners Part 2
Machine Learning Linear Regression Project for Beginners in Python to Build a Multiple Linear Regression Model on Soccer Player Dataset.

Build a Multi-Class Classification Model in Python on Saturn Cloud
In this machine learning classification project, you will build a multi-class classification model in Python on Saturn Cloud to predict the license status of a business.

Build Regression (Linear,Ridge,Lasso) Models in NumPy Python
In this machine learning regression project, you will learn to build NumPy Regression Models (Linear Regression, Ridge Regression, Lasso Regression) from Scratch.

MLOps Project to Build Search Relevancy Algorithm with SBERT
In this MLOps SBERT project you will learn to build and deploy an accurate and scalable search algorithm on AWS using SBERT and ANNOY to enhance search relevancy in news articles.

Recommender System Machine Learning Project for Beginners-4
Collaborative Filtering Recommender System Project - Comparison of different model based and memory based methods to build recommendation system using collaborative filtering.

NLP and Deep Learning For Fake News Classification in Python
In this project you will use Python to implement various machine learning methods( RNN, LSTM, GRU) for fake news classification.

Deploy Transformer-BART Model on Paperspace Cloud
In this MLOps Project you will learn how to deploy a Tranaformer BART Model for Abstractive Text Summarization on Paperspace Private Cloud

Ola Bike Rides Request Demand Forecast
Given big data at taxi service (ride-hailing) i.e. OLA, you will learn multi-step time series forecasting and clustering with Mini-Batch K-means Algorithm on geospatial data to predict future ride requests for a particular region at a given time.

MLOps Project for a Mask R-CNN on GCP using uWSGI Flask
MLOps on GCP - Solved end-to-end MLOps Project to deploy a Mask RCNN Model for Image Segmentation as a Web Application using uWSGI Flask, Docker, and TensorFlow.