Documentation
¶
Overview ¶
Package nametitle is the subpackage of package candidate which generates names with titles stripped away based on pre-defined regular expression patterns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultNameTitlePatterns = []*regexp.Regexp{ regexp.MustCompile("^(.*)$"), regexp.MustCompile("^(?:mister )(.*)$"), regexp.MustCompile("^(?:miss )(.*)$"), regexp.MustCompile("^(?:master )(.*)$"), regexp.MustCompile("^(?:mr(?: |\\. |\\.))(.*)$"), regexp.MustCompile("^(?:mrs(?: |\\. |\\.))(.*)$"), regexp.MustCompile("^(?:ms(?: |\\. |\\.))(.*)$"), regexp.MustCompile("^(?:นาย ?)(.*)$"), regexp.MustCompile("^(?:นาง ?)(.*)$"), regexp.MustCompile("^(?:นางสาว ?)(.*)$"), regexp.MustCompile("^(?:เด็กชาย ?)(.*)$"), regexp.MustCompile("^(?:เด็กหญิง ?)(.*)$"), regexp.MustCompile("^(?:ดช(?: |\\. |\\.))(.*)$"), regexp.MustCompile("^(?:ดญ(?: |\\. |\\.))(.*)$"), regexp.MustCompile("^(?:น\\.ส\\. ?)(.*)$"), regexp.MustCompile("^(?:ด\\.ช\\. ?)(.*)$"), regexp.MustCompile("^(?:ด\\.ญ\\. ?)(.*)$"), }
DefaultNameTitlePatterns is a sequence of all compiled regular expression objects which separates bare names from their prefixed and suffixed titles in a full name string. As of current, only common English and Thai prefixed titles are handled.
var GenerateNamesWithoutTitles = candidate.MakeRegexpGenerator(DefaultNameTitlePatterns)
GenerateNamesWithoutTitles is a preset function which generates a sequence of all possible bare names (or names without prefixed or suffixed titles). It is built upon the function DecomposeName with the patterns from DefaultNameTitlePatterns.
Functions ¶
This section is empty.
Types ¶
This section is empty.