Mnemonic tools
Project description
hm
Mnemonic tools
To install: pip install hm
Mnemonic Major System
The major system is a mnemonic technique used to aid in memorizing numbers.
It works as follows:
>>> from hm import MajorSystem
>>> m = MajorSystem()
The "Mnemonic Major System" (https://en.wikipedia.org/wiki/Mnemonic_major_system) assigns a set of similar phonemes to each digit:
>>> assert m.phones_for_num == {
... 0: {'S', 'Z'},
... 1: {'D', 'DH', 'T', 'TH'},
... 2: {'N'},
... 3: {'M'},
... 4: {'R'},
... 5: {'L'},
... 6: {'CH', 'JH', 'SH'},
... 7: {'G', 'K'},
... 8: {'F', 'V'},
... 9: {'B', 'P'}
... }
As a consequence these phonemes are mapped to numbers:
>>> assert m.num_of_phone == {
... 'B': 9,
... 'CH': 6,
... 'D': 1,
... 'DH': 1,
... 'F': 8,
... 'G': 7,
... 'JH': 6,
... 'K': 7,
... 'L': 5,
... 'M': 3,
... 'N': 2,
... 'P': 9,
... 'R': 4,
... 'S': 0,
... 'SH': 6,
... 'T': 1,
... 'TH': 1,
... 'V': 8,
... 'Z': 0
... }
Any sentence has a corresponding phoneme sequence:
>>> m.term_to_phones('wild cat')
['W', 'AY1', 'L', 'D', 'K', 'AE1', 'T']
The system doesn't contain all phonemes; only some of the consonant phonemes. So if we only keep those phonemes that the system covers, we get:
>>> m.term_to_mst_sequence('wild cat')
['L', 'D', 'K', 'T']
Which corresponds to a number.
>>> m.term_to_nums('wild cat')
[5, 1, 7, 1]
But really, the system is used to be able to create words (therefore images) that correspond to a sequence of numbers, so that one can remember them:
>>> m.terms_of_numstr['3214'] # doctest: +NORMALIZE_WHITESPACE
['hammontree', 'mahindra', 'manteer', 'mantra', 'mentor', 'minteer', 'mondry',
'monetary', 'monteiro', 'monterey', 'montero', 'monterrey', 'montrouis',
'montroy', 'montuori', 'omohundro']
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hm-0.0.4.tar.gz.
File metadata
- Download URL: hm-0.0.4.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
138de0fe7240950c7dc7cf8e24564806958e702dabb86b38858b4b23e481c6f9
|
|
| MD5 |
1283fa2181be44432afbb88be4e01f57
|
|
| BLAKE2b-256 |
c011b19437c41c9a23a7c082af5f45f5a8d4c4e8c27181ac290fd38b6fd35c84
|
File details
Details for the file hm-0.0.4-py3-none-any.whl.
File metadata
- Download URL: hm-0.0.4-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.28.0 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cae924bf888068df21da25345c7927b029f3a4e54b95a0c4a88e1f62db4bd7d0
|
|
| MD5 |
e38a766629da219bc431c28c325b8bf3
|
|
| BLAKE2b-256 |
bb2051bc938848b5aa6efb5f1015bf973eba05f7d0b3e716e5c10ed514915b05
|