Brutal 164 Posted September 14, 2013 Report Share Posted September 14, 2013 Here's what I am trying to do but can't seem to figure out: I scrape a page of text, and I want to count how many times a specific word or phrase is used in that content. Example: the dog has fleas, but his fleas are trained to act like dogs, so the dogs fleas are going to make a great circus act. I want to count how many times the word "fleas" has been used in the content. Of course, the control word (fleas in this case) would be in the form of a variable that the user would enter the phrase/word to search for. Any idea on how to achieve this? Quote Link to post Share on other sites
the_way 52 Posted September 14, 2013 Report Share Posted September 14, 2013 add list to list$list from textsplit the list by delimiter 'fleas'return the list total 2 Quote Link to post Share on other sites
Brutal 164 Posted September 14, 2013 Author Report Share Posted September 14, 2013 You're a Rock Star man!... I appreciate it. It's still giving me funky results, but it is also better than what I had, so thanks again man. Quote Link to post Share on other sites
the_way 52 Posted September 14, 2013 Report Share Posted September 14, 2013 if you want to catch Fleas, and fleas, then you could have the keyword change case, find and replace both the words through the text with something like '@@@keyword@@@' and then split with that as the delimiter. Quote Link to post Share on other sites
Brutal 164 Posted September 14, 2013 Author Report Share Posted September 14, 2013 good call man - i'm going to do that. Thanks again for the great help. 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.