MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

List operations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg57976] List operations
  • From: hrocht at mail15.com
  • Date: Wed, 15 Jun 2005 05:58:09 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

suppose i have a list containing a whole book, the list will contain 
words, sentences, chapters; as an example:
lst={{{"abc","def"},{"as","red"}},{{"fat","qqq","qqq"},
{"asd","asd","vbn"}},{{"zz","zz"}},{{"zz","wtt","wtt"}},{{"red","zz"},
{"sd","ed"},{"er","to"}},{{"ww","ww","dff"},{"as","end"}}}

please check sometimes some servers may insert the false "-" letter 
in the above lst.

here is the book lst contains six chapters, 11 sentences, 
the question is:  what are the general methods wich could be used to 
know how many words, and how many sentences and how many chapters 
between an arbitrary two words in the book such as an example:
between the word number 2 in sentence 2 in chapter 2 
and the word number 2 in sentence 1 in chapter 5 

ie:
wrd1=lst[[2]][[2]][[2]]
wrd2=lst[[5]][[1]][[2]]

the results will be: if we count the 2 words and their own sentences 
and chapters:
 9 words, 4 sentences, 4 chapters.
reards.
Anton


  • Prev by Date: Randomness Test
  • Next by Date: fitting multiple datasets
  • Previous by thread: Re: Randomness Test
  • Next by thread: Re: List operations