lq-text: LQT_ReduceWordToRoot

API char * LQT_ReduceWordToRoot (db, WordInfo) t_LQTEXT_Database *db; t_WordInfo *WordInfo;

Purpose

Reduces the word in the WordInfo pointed to by its argument to an English root, by stripping plurals and possessives. WordInfo->Length is modified as necessary, and WordInfo->Flags are updated by or'ing any necessary items from <wordrules.h>. The word can grow by up to two characters in length. It is the caller's responsibility to allocate enough space. You can also use the WORDROOT macro from <wordrules.h>, which calls LQT_Reduce­Word­To­Root only if it might make a change.

Returns

A pointer to WordInfo's Word

Bugs

This routine is only sensible for English.

See Also: