Skip to main content

Customize a word set, and then use the words in this set to represent any sentence.

Project description

Animal Language

Customize a word set, and then use the words in this set to represent any sentence.

Install

pip install --upgrade animal-language

Usage

To encode a sentence with these characters and words:

m, oo, b, aa, z

(or use moo, baa, zzz, but it will increase the encoded string's length)

1) Create a Translater

from animal_language import ALTranslater

translater = ALTranslater(['m', 'oo', 'b', 'aa', 'z'])

2) Encode Any String

use the translater to encode any string you want.

encoded_str = translater.encode('hello, this is a test')

The encoded_str will be like :

oooombbooboozmmbaabbmooaaoobaambzzooaaaaaazmbmbooaam

3) Decode the Encoded String

Also use the translater to decode the encoded_str.

decoded_str = translater.decode(encoded_str)

The decoded_str is equal to the string you encoded

Other Information

  • The word list must be like "prefix codes", lists like ['a', 'ab'] will not supported.
  • You can set the encoding of the input string.
  • JUST HAVE FUN AND ENJOY THIS bmoooombaaooooaambooz !

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

animal-language-0.1.2.tar.gz (4.2 kB view details)

Uploaded Source

Built Distribution

animal_language-0.1.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file animal-language-0.1.2.tar.gz.

File metadata

  • Download URL: animal-language-0.1.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.6.8rc1 Windows/10

File hashes

Hashes for animal-language-0.1.2.tar.gz
Algorithm Hash digest
SHA256 b22e9afcd9c665b741cc2a61fad3e23b8763d4223ca1bf239669bc4bdc738802
MD5 a96e727a6dbd1f3a90fb91cc39c5c37e
BLAKE2b-256 857a1d668a5438d818417e2b63e93463aa930a74f4d24fcd3aca32ccdb5d2a5e

See more details on using hashes here.

File details

Details for the file animal_language-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: animal_language-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.6.8rc1 Windows/10

File hashes

Hashes for animal_language-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a84fe8a4eaef2997b91c6cf3c01939b38a393e79444338e4bcfc09b76a19b0dc
MD5 c5e2fcec96d1695ff96c9328ab76544d
BLAKE2b-256 d93bd482ad8ed28224c886106fae3e85f6c3ad48c9c192fe000282cde2ad1f0f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page