Use stemming for the indexed terms
Instead of exact matching on searched terms, we can use stemming on both ends of the search:
- the index stores stemmed terms
- the search stems the terms of the query
The stemming is done through the Porter stemming algorithm:
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14, no. 3, pp 130-137
and released under the public domain or terms that are BSD-license compatible:
All these encodings of the algorithm can be used free of charge for any purpose.
There are better stemming algorithms, these days, but none have perfectly compatible implementation in multiple languages or incredibly permissive licenses that are compatible with gi-docgen's; so for the time being, the Porter algorithm will do.