- #1
nanoWatt
- 88
- 2
I developed a php page that allows you to paste in text, and gives all the words listed alphabetically, and their counts in the text, tab delimited.
http://www.cnetworksllc.com/word_lister
for instance, if I type "the quick red fox jumps over the lazy brown dog"
I get:
brown 1
dog 1
fox 1
jumps 1
lazy 1
over 1
quick 1
red 1
the 2
I am wondering about pseudo-code to give me word pairs like:
the quick 1
quick red 1
red fox 1
fox jumps 1
jumps over 1
over the 1
the lazy 1
lazy brown 1
brown dog 1
PHP gives an EXPLODE function that converts a string to an array using a delimiter. I probably could use a reverse loop counting down from the word count, and concatinating two words.
http://www.cnetworksllc.com/word_lister
for instance, if I type "the quick red fox jumps over the lazy brown dog"
I get:
brown 1
dog 1
fox 1
jumps 1
lazy 1
over 1
quick 1
red 1
the 2
I am wondering about pseudo-code to give me word pairs like:
the quick 1
quick red 1
red fox 1
fox jumps 1
jumps over 1
over the 1
the lazy 1
lazy brown 1
brown dog 1
PHP gives an EXPLODE function that converts a string to an array using a delimiter. I probably could use a reverse loop counting down from the word count, and concatinating two words.
Last edited by a moderator: