Translate text into Pig Latin using Python
Project description
# Python Pig Latin
Translate text into Pig Latin using Python
## How it works
This script converts English text in Pig Latin following these steps:
Strips non-alpha or single space characters from input text
Converts input text to all lower case
For words that start with consonants, moves all consonants before the first vowel to the end of the word (“the” becomes “ethay” not “hetay”)
For words that start with vowels, nothing is changed, only the suffix is added
Adds suffix “ay” to the end of words
## Instructions
Install with Pip/PyPi in the command line interface:
` pip install pig-latin `
In your Python code, import the library:
` import piglatin `
Call the translator in your code:
` piglatin.translate('Your text goes here!') `
Your text will be translated into Pig Latin and returned as a string.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pig-latin-0.1.4.tar.gz
.
File metadata
- Download URL: pig-latin-0.1.4.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
515b31847224e50fb922dd7988c4249cde9ed23fb966a891c34ec4dbcb084f6a
|
|
MD5 |
70a6b52cd4e805a0433c4a986e5df324
|
|
BLAKE2b-256 |
72613d25f7d1d9617a53febbae6a64925f5f9f5253ca6571987006bc5f8c1222
|
File details
Details for the file pig_latin-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: pig_latin-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
78824d802ca3290e661eb76ee873fc59c47a16641eac1d223301d11fe398fe7f
|
|
MD5 |
fbab3b3d703a3d86a690855306de15d8
|
|
BLAKE2b-256 |
6310dd4a26dfdf83ec61e9b9ca57faa3f49e944b75a804af979aa6a0d2253698
|