<!DOCTYPE File PUBLIC "-//Liam Quin//DTD C API Documentation v1.1//EN" "doc.dtd"><File>
<Entry dir="liblqtext">
<Function File="../../src/liblqtext/phstring.c">
<Name>LQT_StringToPhrase</Name>
<Class>Retrieval/Phrases
<Purpose>
<P>Creates a data structure representing the natural language phrase
contained in the given String.</P>
<P>Words in the phrase that could not possibly be in the index are not
included in the structure.  This could be because they are
in the stop list or are too short, or because the IndexNumbers
parameter is set to `off' in the database configuration file and
the words begin with a digit.</P>
<P>Words that could be in the database, but are not, are also
excluded, but in this case the phrase cannot of course be matched.</P>
<P>Words ending in * or ? are considered to be wildcards;
they are expanded automatically by LQT_MakeMatchesWhere,
or you can use LQT_ExpandWildCard to iterate over all the matches.
<P>You can use LQT_NumberOfWordsInPhrase on the returned result,
if it is not NULL, to determine the number of words in the string
that were recognised as words that are in the database.</P>
<P>The result of LQT_StringToPhrase can be passed to
LQT_MakeMatches to find all occurrences of the phrase in the
database.</P>.
<Returns>
the created t_Phrase, or NULL if either an error occurred or
there were no recognised words in the given String.
<SeeAlso>
LQT_MakeMatchesWhere
LQT_DestroyPhrase
</Function>
<Decl>
API t_Phrase *
LQT_StringToPhrase(db, String)
    t_LQTEXT_Database *db;
    char *String;
</Decl>
</Entry>
