Documentation ¶
Overview ¶
Package personal is a tiny library to score strings as fullname or emails. Given a list of strings the library returns which is the most accurate Fullname or Email.
Index ¶
- Variables
- func GetBestEmail(emails []string) string
- func GetBestFirstname(names []string) string
- func GetBestFullName(names []string) string
- func ScoreEmail(email string) float64
- func ScoreEmails(emails []string) map[string]float64
- func ScoreFullName(s string) float64
- func ScoreFullNames(names []string) map[string]float64
Constants ¶
This section is empty.
Variables ¶
var TLDs = map[string]interface{}{}/* 3813 elements not displayed */
TLDs is a map of tld for quick lookup
Functions ¶
func GetBestEmail ¶
GetBestEmail returns the best email that can be found on the list of strings.
func GetBestFirstname ¶
GetBestFirstname returns the first name that can be found on the list of fullnames.
func GetBestFullName ¶
GetBestFullName returns the best fullname that can be found on the list of strings. It gives priority to strings with correctly capitalized names, only letter strings, longer strings and strings with more than two words and less than four.
func ScoreEmail ¶
ScoreEmail returns the score for a given email, higher is better.
func ScoreEmails ¶
ScoreEmails returns a map with the emails and its score, higher is better
func ScoreFullName ¶
ScoreFullName returns the full name score for a given string
func ScoreFullNames ¶
ScoreFullNames returns a map with the fullnames and his score, higher is better
Types ¶
This section is empty.