JavaScript-Name-Parser
JavaScript-Name-Parser copied to clipboard
add professor to salutation
Hi,
maybe you could add to the
NameParse.is_salutation
function:
else if (word === "prof") {
return "Prof."
Thank you !
I ended up splitting the salutations (Mr, Mrs, Miss, etc) from prefixes (Titles). My app is in genealogy, so I had a lot of prefixes, which we enter as titles.
var prefixArray = [
'dr', 'rev', 'fr', 'bro', 'chap', 'jud', 'prof', 'sr', 'sen', 'the hon',
'hon', 'amd', 'bg', 'bgen', 'brig gen', 'cpt', 'capt', 'cwo', 'lord', 'lady', 'dea',
'col', 'cdr', 'cpl', 'ens', '1lt', '1st lt', 'ltjg', '2lt', '2nd lt', 'lieut',
'lt', 'gen', 'ltc', 'lt col', 'lcdr', 'ltg', 'lt gen', 'maj gen', 'mg',
'pvt', 'maj', 'msg', 'msgt', 'sgt', 'radm', 'vadm', 'brother', 'chaplain', 'deacon',
'doctor', 'father', 'judge', 'missus', 'madam', 'professor', 'reverend', 'reverand', 'baron',
'senator', 'congressman', 'governor', 'governer', 'govenor', 'sister', 'the honorable', 'honorable', 'honerable',
'admiral', 'brigadier general', 'captain', 'chief warrant officer', 'colonel',
'commander', 'corporal', 'ensign', 'first lieutenant', 'lieutenant colonel',
'lieutenant general', 'lieutenant commander', 'lieutenant', 'master sergeant',
'major general', 'major', 'general', 'rear admiral', 'vice admiral', 'admiral',
'second lieutenant', 'sergeant', 'the honourable', 'honourable', 'right honourable', 'pfc',
'president', 'representative','councilor', 'ambassador','mayor','secretary','emperor','empress',
'tsar','tsarina','king','queen','shah','sultan','sheik','sheikh','shaik','shaikh',
'shayk','shaykh','shekh','cheikh','prince','princess','elector', 'arch duke', 'duchess',
'marquis', 'marquess', 'marquise', 'marchioness', 'viscount', 'viscountess',
'count','countess','baron','baroness','sir','pope','cardinal','archbishop','bishop', 'cantor', 'hon cantor',
'patriarch','abbot','vicar','rabbi','caliph','imam','ayatollah','chancellor','commissioner'
];