calculate name score in a file