Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 3
0
 def test_three_name_lowercase_middle(self):
     corpus = "Ludwig van Beethoven"
     names = namere.find_names(corpus)
     assert "Ludwig van Beethoven" in names
Exemplo n.º 4
0
 def test_three_name(self):
     corpus = "Harrison Parker Chiu"
     names = namere.find_names(corpus)
     assert "Harrison Parker Chiu" in names
Exemplo n.º 5
0
 def test_mc(self):
     corpus = "Stephen McClellan"
     names = namere.find_names(corpus)
     assert "Stephen McClellan" in names
Exemplo n.º 6
0
 def test_o_apostrophe(self):
     corpus = "Steven O'Malley"
     names = namere.find_names(corpus)
     assert "Steven O'Malley" in names