lq-text: LQT_AllPhrasesOfLengthNOrMore

API t_PhraseElement * LQT_AllPhrasesOfLengthNOrMore (db, N, theQuery, Countp) t_LQTEXT_Database *db; int N; char *theQuery; long *Countp;

Purpose

Finds all sequences of N or more words which occur in the data. For example, given the phrase `the barefooted boy was very slender', and supposing `the' to be the only word for which LQT_Word­Is­In­Stop­List returns true, LQT_All­Phrases­Of­Length­NOr­More might find `barefooted boy' and `boy was very' and `very slender' as sub-phrases that occur; if the entire phrase occurs, it will be returned.

If a phrase of M words matches, all phrases of lengths from N to M inclusive will also be returned.

It is the caller's responsibility to deallocate the returned array and its elements.

Returns

an array of t_PhraseElement structures, and the number of distinct phrases found in *Countp.

Notes

This function is experimental. It has not been optimised, and is currently unusable for long phrases as a result.