Static 

In this method, we have a Lookup table; it consists of all possible substitutions for a given set of inputs. This Lookup table can be visualized like this:

Source Text (y)

Substituted Text (y)

Steve Jobs

AAPL-1

Cat

123456789

Tennis

Cricket

 

This table illustrates how a Lookup table can be constructed for substituting source text with a different text. This method scales well when there is a predefined quantity of substitutions available.

Another example of this Lookup table-based substitution is when we follow a naming standard for country codes, for example, ISO-8661:

Source Text (x)

Substituted Text (y)

Egypt

EG

India

IN

Saint Vincent and Grenadines

VN

United Kingdom

Get Modern Big Data Processing with Hadoop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.