Converting words and letters into numbers

as a newby on the forum i would like to ask you if you could help me out.

I need to convert a many paged document into numbers.

logicly a=1, b=2, …z=26 & 1=1, 2=2, etc…
the numbers of the letters need to be seperated by comma’s

and the spaces between words must be replaced by dashes

so for example:
“i am crazy for doing this” should look like this:

“9-1,13-3,18,1,26,25-6,15,18-4,15,9,14,7-20,8,9,19”

does anyone know of a script that will take up to 500 words per conversion, or does anyone know a application that will be able to do this? unlimited amount of words would even be better.

Thanx in advance,
Raoul