Here's a bit of a progress report:
I've finally had a chance to intensely play with the script "filter without" which is something I've never before used. In fact, I only read of the filter command about a week ago, and saw it in conjuction with forcing a user to save a text file with the proper extension. (It was part of Dan Shafer's "To Do List" program example).
Anyway, I am finding "filter without" to be extremely powerful and useful in this project.
Thanks much. Cheers, deeverd
Just One Array Intersect Question
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Hi Deeverd,
I found a link to this discussion today and after reading the whole lot, I'm thinking, why do you want to check the occurrence of particular words only and, if indeed particular words, why is all this turning out to be so complex?
Why can't you simply do something like this:
Untested, it might not work, but you get the idea.
Best,
Mark
I found a link to this discussion today and after reading the whole lot, I'm thinking, why do you want to check the occurrence of particular words only and, if indeed particular words, why is all this turning out to be so complex?
Why can't you simply do something like this:
Code: Select all
put the number of words of myBook into myNr
repeat for each word myWord in myList
if myWord is in myBook then
put myBook into myTempBook
replace myWord with empty in myTempBook
put myNr - number of words of myTempBook into myArray[myWord]
else
put 0 into myArray[myWord]
end if
end repeat
combine myArray by cr and tab
put myArray into fld "Your Table Field"
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Hi Mark,
Thanks for remembering my plight. Your script looks fascinating and I will definitely experiment with it. I never did get the array to work completely in the manner I had originally planned, but with your insight and advice on using the "filter with" and "filter without" commands, I can now receive very accurate returns very quickly.
You were wondering why I would want to find the numbers of the occurence of particular words. By June of this year at the university, I will finally be completing all the coursework for my PhD program, which combines my major of literacy with my minor of technology in education. What I am creating is software for my dissertation to analyze high school writing proficiency examinations in order to determine what the successfully passing examinations have in common, what the barely passing examinations have in common, and what the unsuccessful examinations have in common, plus how each of those categories differ from one another.
One of the ways of doing this is to create arrays that give me a list of unique words, and arrays that give me frequencies of words. There's a lot of other things involved too, but I will be gaining a lot of my data in that way so that in the future, my research will hopefully be used by teachers to help more students to pass these tests, since they cannot receive a high school diploma if they don't pass.
Thanks again. Looking very forward to trying this script. All the best, deeverd
Thanks for remembering my plight. Your script looks fascinating and I will definitely experiment with it. I never did get the array to work completely in the manner I had originally planned, but with your insight and advice on using the "filter with" and "filter without" commands, I can now receive very accurate returns very quickly.
You were wondering why I would want to find the numbers of the occurence of particular words. By June of this year at the university, I will finally be completing all the coursework for my PhD program, which combines my major of literacy with my minor of technology in education. What I am creating is software for my dissertation to analyze high school writing proficiency examinations in order to determine what the successfully passing examinations have in common, what the barely passing examinations have in common, and what the unsuccessful examinations have in common, plus how each of those categories differ from one another.
One of the ways of doing this is to create arrays that give me a list of unique words, and arrays that give me frequencies of words. There's a lot of other things involved too, but I will be gaining a lot of my data in that way so that in the future, my research will hopefully be used by teachers to help more students to pass these tests, since they cannot receive a high school diploma if they don't pass.
Thanks again. Looking very forward to trying this script. All the best, deeverd
Hello bjb007,
Thanks for your vote of confidence. I, too, am often amazed that my colleagues specialize in areas that seem to be of so little use to so few people. But who's to say? Bringing new knoweldge into the world that does not seem very relevant today might have an important impact for tomorrow. Nevertheless, I like to pursue what I can use right now. Have a great week, deeverd
Thanks for your vote of confidence. I, too, am often amazed that my colleagues specialize in areas that seem to be of so little use to so few people. But who's to say? Bringing new knoweldge into the world that does not seem very relevant today might have an important impact for tomorrow. Nevertheless, I like to pursue what I can use right now. Have a great week, deeverd