• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: jmlbeud ceararhtcs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jmlbeud ceararhtcs


  • Subject: Re: jmlbeud ceararhtcs
  • From: "Arthur J. Knapp" <email@hidden>
  • Date: Mon, 22 Sep 2003 11:14:07 -0400

> Date: Sun, 21 Sep 2003 14:54:14 -0300
> From: Bill Briggs <email@hidden>
> Subject: Re: [OT] Re: jmlbeud ceararhtcs

> Interestingly enough, the original text of the portions of the bible
> that were written in Hebrew were written with no vowels, no word
> breaks, no sentence breaks, and no verse breaks. A continuous flow of
> consonants.

Which is why I like to say, "If God had wanted us to understand the
Bible, He would have given the Hebrews vowels...." ;-)


> Actually there are a set of transition frequency tables for the
> phonemes just as there are for written letters

This is a fast means of obtaining the ordinal number of a letter in
the English alphabet, which uses a frequency-based method to decide
the order of the if-statements.

(* Given a "letter" character, returns it's ordered number
* from 1 to 26, otherwise, we return 0. This handler also
* works with diacritical characters.
*)
on OrdinalLetter(c)

ignoring case and diacriticals -- "a" = "A" = "a" = "A"

(* We test letters in their naturally occurring order
* of frequency, (within the English language). This
* has been shown to considerably speedup processing.
*)
if (c is in "etaoinshrdlcumwfgypbvkjxqz") then

(* We also use an AppleScript "binary contains"
* search to decrease our search time as much
* as possible:
*)
if (c is in "etaoinshrdlcu") then
if (c is in "etaoin") then
if (c is in "eta") then
if (c = "e") then
return 5
else if (c = "t") then
return 20
else -- (c = "a")
return 1
end if
else if (c = "o") then
return 15
else if (c = "i") then
return 9
else -- (c = "n")
return 14
end if
else if (c is in "shr") then
if (c = "s") then
return 19
else if (c = "h") then
return 8
else -- (c = "r")
return 18
end if
else if (c = "d") then
return 4
else if (c = "l") then
return 12
else if (c = "c") then
return 3
else -- (c = u)
return 21
end if
else if (c is in "mwfgyp") then
if (c is in "mwf") then
if (c = "m") then
return 13
else if (c = "w") then
return 23
else -- (c = "f")
return 6
end if
else if (c = "g") then
return 7
else if (c = "y") then
return 25
else -- (c = "p")
return 16
end if
else if (c is in "bvk") then
if (c = "b") then
return 2
else if (c = "v") then
return 22
else -- (c = "k")
return 11
end if
else if (c = "j") then
return 10
else if (c = "x") then
return 24
else if (c = "q") then
return 17
else -- (c = "z")
return 26
end if
else
return 0
end if
end ignoring
end OrdinalLetter


Yeah, lots of lines of code... but fast, trust me.



{ Arthur Knapp, of <http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m

"Love is like oxygen..."
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: jmlbeud ceararhtcs
  • Next by Date: Re: Quark 6 Question
  • Previous by thread: Re: jmlbeud ceararhtcs
  • Next by thread: Re: jmlbeud ceararhtcs
  • Index(es):
    • Date
    • Thread