MorseDict:
Filter:
Morse/Classes (extension) | HistoricalCommunication

MorseDict
ExtensionExtension

a dictionary of Morse code signs.

Description

MorseDict is used by the Morse class to look up Morse symbols as defined in the standard Morse alphabet. It can do several kinds of lookups and conversions which may be useful for different

Class Methods

.keys

all keys that are defined in the Morse alphabet.

.postKeys

a convenience method to post all keys.

.strings

the strings used to transliterate dot, dash, word break.

.codes

the dict of all dot-and-dash patterns corresponding to each key in the Morse alphabet. E.g. the pattern for $a is dot-dash, encoded here as [0, 1].

.signs

get the signs for a single character or symbol

Arguments:

char

the char to look up

.wordSigns

get the sequence of signs for a word or text

Arguments:

word

a string or sequence of chars and symbols

.at

look up code for single char or symbol

Arguments:

code

a single char or symbol as defined in the keys

.fromAscii

same as at method

.letters

lookup dict from dot-dash patterns to characters or symbols

.letter

look up the corresponding letter or symbol for a given dot-dash code.

Arguments:

code

a string of dots and dashes.