November 2017
Beginner to intermediate
204 pages
5h 23m
English
There is no way of objectively quantifying the extent to which the matches are correct without having a better pattern matching tool to begin with. It is a good idea, however, to get a qualitative sense of whether the regular expression is working properly. This can be done by printing out the identified street addresses. Because the print() function can slow down the program when working with files, it is good practice to limit the number of print() function calls. In the following continuation of extract_street_names.py, for addresses that produce a match, the street address is extracted from the address string. Using the match_count variable to limit the print() function calls, the first 200 street ...
Read now
Unlock full access