Is that word Feminine or Masculine?
Retina, 26 bytes (sets 4, 5)
[^u]es|ee|m.i|y|^...c|d.*a
Retina is @MartinBüttner's regex language. I haven't used anything specific to .NET regexes, so you can test the regex at Regex101 here. Alternatively you can use Retina's grep G
mode like so:
G`[^u]es|ee|m.i|y|^...c|d.*a
and pipe in a file with one word per line for batch testing.
Retina outputs the number of matches by default, giving us our truthy/falsy value. The rule "the values don't all have to be the same truthy/falsy type" is pretty important though since marchioness
matches twice, giving an output of 2.
(Using the mod-chaining method from the previous male/female question seems to be shorter in CJam, but I'll let someone else do that)
Retina, 39 32 bytes (sets 2, 4)
Accounting for marquess
was annoying, since using ma
was the best way to get some of the feminines.
[^u]es|ma$|mo|y|[mie]e|wi|ter|au
Try it here
Thanks to Sp3000 for his golf suggestion.
Retina, 28 bytes (sets 3,4)
w|[mhorse]e|[^u]es|duc|[dn]y
Retina uses .NET regex, but any flavor should work. Test it at Regex101.