Skip to content
This repository was archived by the owner on Aug 31, 2024. It is now read-only.

tsukinoinaba/word-replacement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Word Replacement

This is a simple Python program to replace an arbitrary set of words in a body of text.

Usage

Run the program using

python regex.py

First, the program will prompt you to enter the text passage. Enter or paste the text into the terminal.

Then, the program will prompt you to supply a JSON file. This JSON file should contain a list of pairs, where the key is the word in the original text to be replaced, and the value is the new word to take its place. For example, see pronouns.json as an example, which is used to replace masculine pronouns (he/him/his) with feminine pronouns (she/her/hers). Note that the words are case-sensitive.

Words will only be replaced in whole, and not if they are a part of another word. For instance, the will not be converted to tshe using pronouns.json.

About

Simple program to replace words in a text

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages