diff --git a/generators.html b/generators.html index 0cad642..3fb0dc9 100644 --- a/generators.html +++ b/generators.html @@ -233,7 +233,7 @@ def build_match_and_apply_functions(pattern, search, replace): for (pattern, search, replace) in patterns]
re.search() to see if this rule matches. The second and third strings in each group are the search and replace expressions you would use in re.sub() to actually apply the rule to turn a noun into its plural.
-build_match_and_apply_functions() function, which just happens to take three strings as parameters and return a tuple of two functions. This means that rules ends up being functionally equivalent to the previous example: a list of tuples, where each inner tuple is a pair of functions. The first function is the match function that calls re.search(), and the second function is the apply function that calls re.sub().
+build_match_and_apply_functions() function. That is, it takes each triplet of strings and calls the build_match_and_apply_functions() function with those three strings as arguments. The build_match_and_apply_functions() function returns a tuple of two functions. This means that rules ends up being functionally equivalent to the previous example: a list of tuples, where each inner tuple is a pair of functions. The first function is the match function that calls re.search(), and the second function is the apply function that calls re.sub().
Rounding out this version of the script is the main entry point, the plural() function.