Re: phrase search



nicolas_laurent545@xxxxxxxxxxx wrote:
Not mathematician, could someone explains to me in plain words what
this pseudo code means. If you provide an example it would be very
appreciated. I understand the first part.
Many thanks

Find set of documents D in which all keywords (k1...km) in phrase occur
(using AND query processing).
Intitialize empty set, R, of retrieved documents.

For each document, d, in D:
Get array, Pi ,of positions of occurrences for each ki in d
Find shortest array Ps of the Pi's
For each position p of keyword ks in Ps
For each keyword ki except ks
Use binary search to find a position (p - s + i) in
the array Pi
If correct position for every keyword found, add d to R
Return R


What programming language(s) do you use?

For each of your variables, make a variable, those are all legal
identifiers in pretty much every programming language so just use those
names, identifiers.

Take the pseudo-code, and copy it directly into the source code file.
Put it in the comments. Then, under each line of the pseudo-code,
implement that.

Then, you have to figure out the type of the variables. For example, a
"document set" might be a list of filenames or maybe they are database
strings. Anyways you need to understand how to use containers of
programmatic objects, so you can make one, saying it's the empty set
means just don't add anything to it, or call the clear() method on it
or so.

Then there's what they call a "for loop", within it a nested "for
loop". Those are flow of control statements of the program that repeat
the processing of the body of the loop until the condition that exits
the loop, which in C is right with the loop declaration, then it has to
get an array, or result set, of the positions, then process the array.

The difficult part will be finding the types of the variables that work
with the software libraries you have.

Your question is off-topic for sci.logic. You should take your
question to comp.programming, for example. The sci.logic is for talk
about boring dry mathematical logic.

For, example, I say ZF is inconsistent. Also, I know why I say that
and what it means.

Ross

.



Relevant Pages

  • Re: Puppy Mastiff wants to Nip at Faces
    ... in my first college textbook on structured programming. ... they did was loop through an array to show how you could easily ... design, PIC code, and real time programming. ...
    (rec.pets.dogs.behavior)
  • Re: Puppy Mastiff wants to Nip at Faces
    ... in my first college textbook on structured programming. ... they did was loop through an array to show how you could easily access ...   and improve your crack pot licensing fee calculator. ...
    (rec.pets.dogs.behavior)
  • Re: Assitance - Formal Programming
    ... I am presently reading "The Science of Programming" by David Gries, ... Show that P is true before execution of the loop begins. ... >> figure out how I could assertain the weakest precondition? ... > Please note the array limits in the invariant Pi. ...
    (comp.programming)
  • Re: Puppy Mastiff wants to Nip at Faces
    ... in my first college textbook on structured programming. ... they did was loop through an array to show how you could easily access ...   arrays and loops because it makes for less work. ...
    (rec.pets.dogs.behavior)
  • RE: Error 3021
    ... Create proto-file names using the selected job names and storre to an array ... Save and close the document and repeat the loop ... Dim strJobsAs String, strDocsAs String, varValsAs _ ...
    (microsoft.public.access.modulesdaovba)