How to find words and phrases as well

Eric Chatonet eric.chatonet at sosmartsoftware.com
Sun Jan 29 06:30:16 EST 2006


Hi Andre,

First you could use a comma as the delimiter in your list: this would  
allow to have words and "phrases" at the same time.
Then just an idea I use often:

   unmark all cds
   mark cds by finding whole item 1 of fld "Keywords"
   repeat with i = 2 to the number of items of fld "Keywords"
     mark cds by finding whole (item i of fld "Keywords") AND the  
mark of this cd
   end repeat

Elegant and very fast ;-)
The process marks cards where all "items" are found at least one time.
The trick: you can specify more than one condition to mark cards...

Then you can easily get the list of current marked cards or just  
navigate through the marked cards only:
go next/prev marked cd

Hope this helps.

Le 29 janv. 06 à 11:55, André.Bisseret a écrit :

> Hello,
> I was just about posting an answer to Éric, when I read the  
> messages from Jeanne, Wilhelm, and Jim. Thanks a lot to all of you  
> for your attention ; that makes me much more serene for this week- 
> end !

<snip>

> BUT I would like to improve the selectivity of the filter:
>  In order to get more precise and better selected results, I would  
> like to be able to search not only single words, but possibly  
> phrases (may be this word is ambiguous as it is for French people ;  
> simply I mean “expressions” or “compound-words”), such as  
> “multimedia learning” or “speech recognition” or “touch screen  
> display” etc. but as wholes, not as two or three different single  
> words. Actually, a text including “speech” somewhere and  
> “recognition” elsewhere could well not pertain at all to the  
> subject “speech recognition”. (but, currently, it would be returned  
> by my script).
>
> So, I much would like that the request of a user could include such  
> expressions and/or single words as well.
> For example, [children image “multimedia learning”]; (I quote here  
> only to mean that the third keyword is not two words but one  
> expression).
>
> I think that the problem is right here. If I had to search for only  
> one word or one “expression”, I could easily do it by means of  
> “find whole” or find “string” as you are suggesting.
> But I have to search for the list of keywords and/or  
> keyExpressions. I want to select the cards that include  
> simultaneously each word and expressions requested by the user,  
> regardless of their order and their location in the 3 fields.

Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list