Added remapping of Drew's fullname.

This commit is contained in:
Robert Osfield 2005-11-15 10:05:31 +00:00
parent dd622d7a9a
commit b57c4dad03

View File

@ -264,6 +264,18 @@ void nameCorrection(NamePair& name)
name.first = "Ali"; name.first = "Ali";
name.second = "Botorabi"; name.second = "Botorabi";
} }
if (name.first=="Waltice" && name.second=="")
{
name.first = "Walter";
name.second = "J. Altice";
}
if (name.first=="Drew" && name.second=="")
{
name.first = "Drew";
name.second = "Whitehouse";
}
} }
void lastValidCharacter(const std::string& name, unsigned int& pos,char c) void lastValidCharacter(const std::string& name, unsigned int& pos,char c)
@ -309,9 +321,14 @@ NamePair createName(const std::string& first, const std::string& second)
name = typoCorrection(name); name = typoCorrection(name);
if (second.empty()) return NamePair(name,""); if (second.empty() ||
!validName(second))
if (!validName(second)) return NamePair(name,""); {
// filter any single or two letter words as unlike to be names.
if (name.size()<=2) return EmptyNamePair;
return NamePair(name,"");
}
last = second.size(); last = second.size();
@ -325,6 +342,9 @@ NamePair createName(const std::string& first, const std::string& second)
return NamePair(name, surname); return NamePair(name, surname);
} }
// filter any single or two letter words as unlike to be names.
if (name.size()<=2) return EmptyNamePair;
return NamePair(name,""); return NamePair(name,"");
} }