Chapter 4.18: Searching Conference Text |
[TOP] [UP] [PREV] [NEXT] |
Several very specialized functions provide the capability to search for and display text in the conference items and responses.
The any and inword arguments modify exactly how and when the search succeeds. If any is 1, the search is successful if any of the words in text are found in a response. If any is 0, the search succeeds only if all of the words in text are found in the same response. If inword is 1, the words in text match no matter where they are found in the response -- including in the middle of a word in the response.
(For example, "the" will match "other".) If inword is 0, matches must occur at the beginning of a word. (In that case, "the" will not match "other", but it will match "thesis".)
Find_it() evaluates to a triplet list of responses that had successful matches. (E.g., "17 2 5 17 2 8" means that responses 5 and 8 in item 2 in conference 17 had successful matches.)
Text is typically the entire text of a response. Words contains the word or words that were searched for. Size is the number of distinct words in words. Inword should have the same value it did in $find_it() -- it controls whether matches may be found in the middle of a word (inword = 1), or only at the beginning of a word (inword = 0).