Brian Dunning's FileMaker Custom Functions

Keywords ( text ; separator )

Creates a delimited list of words, with plural words converted into singulars. (English only)

  Average rating: 4.3 (31 votes) Log in to vote

Vaughan Bromfield   Vaughan Bromfield

Share on Facebook Share on Twitter

  Sample input:
Keywords (
"vacancies buyers trying foxes" ;

"ΒΆ"

)
  Sample output:
vacancies
vacancy
vacancie
buyers
buyer
buye
trying
try
tr
trye
foxes
foxe
fox

  Function definition: (Copy & paste into FileMaker's Edit Custom Function window)

This recursive custom function parses the text for plural words (words ending in "ies" or "s") and converts them into their singular forms. To simply the function (and avoid using a dictionary of words) the algorithm makes some best-guesses at the singular forms.

Words ending in "s" could also be words ending in "es" or "ies" so the algorithm takes up to three stabs at the singular form. The result is that some of them will be gramatically wrong.

The result is that the returned string does not look pretty, but it works well for generating keywords for a multi-key match.

As a bonus, at no extra cost, it also takes the "ing" from the end of words.

The function is set up for English, but it should not be too hard to convert it for other languages -- just change the expressions in the first Case() function.

Let me know if you find this useful: I've used many of the custom functions here, this is paying some of that back. ;)

 

Comments

Log in to post comments.

 

Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.

Under construction. Email me your wish list for improvements.