12 October, 2011

Dehydration

Definition


Its the art of shortening a word on basis of sound.

Description


There are rules for shortening as explained in detail further down in this article, for example, silents are ignored, from consecutive-duplicate consonants only one is taken, inner vowels are removed etc.

Reading them involves some guess work, therefore they are appropriate in short texts only, where due to smaller context guessing is more accurate.

Building Blocks of English Language


Consonants have what we can call "hard sounds", such as "s", "n", "p" etc. Vowels have what we can call "soft sounds", such as "i", "e" "o" etc. None of the consonants or vowels can make a word on its own in english language, they need each other. Consonants make the bases, vowels connect them("soon", "peon", "sin", "sit", "net" etc) or appear as suffix or prefix ("eat", "ant", "emergent" etc).

There are five letters in english language which are always a vowel, and there is "y" which is sometimes vowel and sometimes consonant. For example in "yet", "yellow", "yup" etc "y" is a consonant, and in "party", "symphony", "sybase", "myopia" etc "y" is a vowel.

Other than consonants and vowels there is a third building block of english language, its the "Combination of letters that combiney produce a single sound". Examples are:


  • "tion" as in "station", "mention", "tradition" etc.

  • "sh" as in "sharp", "shave", bushes" etc.



Rules



  1. Remove all vowels that appear in between the consonants in a word.

  2. Keep all those vowels that appear at beginning of word and have sound, such as "art" remains "art", "application" becomes "applctn", "ottoman" becomes "ottmn" etc.

  3. Keep all those vowels that appear at end of word and has a sound, such as "see" remains "see", "happily" becomes "Hply", "attache" becomes "atche" etc. Remove those that don't have sound, such as "sine" becomes "sn", "advocate" becomes "advct" etc.

  4. If there are two consonants or two vowels together that have same sound then keep only one of them, such as "suppress" becomes "sprs", "cinderella" becomes "cndrla" etc.

  5. If a consonant or vowel is silent then remove it.

  6. For combination-of-words that combinely produce a single sound, consider them as made up of letters that can make up that sound, not the actual letters, then apply rules to them. Such as "station" is considered as "stashn" and becomes "stshn", "sharp" becomes "shrp", "tradition" is considered as "tradishn" and becomes "trdshn" etc.



Implementations



advocate advct
advocates advcts
add ad
address adrs (keep one consonant)
bench bnch
button btn
cancel cncl
clear clr
court crt
computerized cmptrzd
code cd
comments cmnts
date dt
data dt
diary dry
download dnld
directory drctry
edit edt
empty empty
error err
file fl
father fthr
general gnrl
hidden hdn
index indx
inner inr
insert insrt
inserted insrtd
info inf
information infrmtn
judgement jdgmnt
last lst
list lst
message msg
mother mthr
notification ntfctn
notify ntfy
name nm
nic nc (nic is an abbrevation)
num nm
number nmbr
old old
order ordr
person prsn
party prty (keeping the ending "y")
release rls
row rw
radio rd
random rndm
stream strm
success scs
specific spcfc
signing sgng
table tbl
text txt
type tp
upload upld
update updt
value vl
year yr
partitioon prtshn
protectorate prtctrt
chair chr


Relation to Programming


I am developing this convention for later use in naming of variables. It would be used in naming local variables, means variables declared inside a function, not the parameter-variables.

Similarities


You have already seen something similar before. In microsoft world, a convention very similar is already in use since decades. Take a look:

button btn
textbox txt
directory dir
information info
calendar cdr
clear clr
screen scr

Although this convention is similary to my dehydration convention, its not the same. Some differences are:


  1. The shortform is sometimes restricted to three characters. In dehydration there is no such limit.

  2. Sometimes the second word is totally absent from the shortform. For example "txt" for textbox. In dehydration it would be "txtbx".


Why this convention



  1. Due to no limit on number of characters the frequency of name-collision is low. Name-collision is when the same shortform refers to multiple longforms.

  2. Its easy to make the sound of the word in mind, that helps in reading.

No comments:

Post a Comment