09-17-2014, 05:44 PM
Use function tok.
Macro Macro2429
Macro Macro2429
str s=
;I have this text, stored in a string. What i would like is to devide it in sentences and know how many there are. Afterwards I like to know how many words each sentence counts.
;
;Anyone an idea of how i can realise this?
;
;Thanks !
ARRAY(str) sentences words
int is iw
tok s sentences -1 ".?!" 0x2000
out "%i sentences" sentences.len
for is 0 sentences.len
,tok sentences[is] words -1 ""
,out words.len
,for(iw 0 words.len) out words[iw]
,