Updated proper noun detection algorithm