示例#1
0
def analyze_file(filename):
    names_dict = {}
    with open(filename) as f:
        for line in f:
            increment_count_dict(names_dict, namere.find_names(line))

    return names_dict
示例#2
0
 def test_two_name(self):
     corpus = "Lorem ipsum dolor sit amet Justin Kim"
     names = namere.find_names(corpus)
     assert "Justin Kim" in names
示例#3
0
 def test_three_name_lowercase_middle(self):
     corpus = "Ludwig van Beethoven"
     names = namere.find_names(corpus)
     assert "Ludwig van Beethoven" in names
示例#4
0
 def test_three_name(self):
     corpus = "Harrison Parker Chiu"
     names = namere.find_names(corpus)
     assert "Harrison Parker Chiu" in names
示例#5
0
 def test_mc(self):
     corpus = "Stephen McClellan"
     names = namere.find_names(corpus)
     assert "Stephen McClellan" in names
示例#6
0
 def test_o_apostrophe(self):
     corpus = "Steven O'Malley"
     names = namere.find_names(corpus)
     assert "Steven O'Malley" in names