I need to split a string into dictionary words, ignoring whitespace (the easy part <G>)
The simplest example might be how a domain name bluecargadgets would be parsed into "blue" "car" and "gadgets" and perhaps "gets" and a few others.
Anagram or "jumble" logic is not really good, since I'm not interested in using all the letters, just finding words that already exist - in order - in the string.
I can see a few potential "brute force" methods, but there has to be something more elegant than a
loop -> shift -> chop ->next format.
bluecargadgets
bluecargadget
bluecargadge
bluecargadg
bluecargad
bluecarga
...
blue <- hit
...
b
luecargadgets
luecargadget
...
uecargadg
..
ecarg
...
...
car <- hit
...
gadgets <-hit
gadget <-hit
gets <-hit
get <-hit
etc.
How does google, or the keyword parsers do it? Any ideas?
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.
The simplest example might be how a domain name bluecargadgets would be parsed into "blue" "car" and "gadgets" and perhaps "gets" and a few others.
Anagram or "jumble" logic is not really good, since I'm not interested in using all the letters, just finding words that already exist - in order - in the string.
I can see a few potential "brute force" methods, but there has to be something more elegant than a
loop -> shift -> chop ->next format.
bluecargadgets
bluecargadget
bluecargadge
bluecargadg
bluecargad
bluecarga
...
blue <- hit
...
b
luecargadgets
luecargadget
...
uecargadg
..
ecarg
...
...
car <- hit
...
gadgets <-hit
gadget <-hit
gets <-hit
get <-hit
etc.
How does google, or the keyword parsers do it? Any ideas?
PUGDOG� Enterprises, Inc.
The best way to contact me is to NOT use Email.
Please leave a PM here.