diff --git a/.DS_Store b/.DS_Store index 202195e..0d6c775 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/mr/.DS_Store b/mr/.DS_Store index 0f95520..5117ba3 100644 Binary files a/mr/.DS_Store and b/mr/.DS_Store differ diff --git a/mr/python/mapper.py b/mr/python/mapper.py index 8668ac8..bd5948e 100644 --- a/mr/python/mapper.py +++ b/mr/python/mapper.py @@ -7,7 +7,7 @@ for line in sys.stdin: # remove leading and trailing whitespace line = line.strip() # split the line into words - words = re.findall(r'\b\w+\b', line) # using regex to find words + words = re.findall(r'\b[\w\s]+\b', line) # using regex to find words # increase counters for word in words: # apply regex to remove non-alphanumeric characters and convert to lowercase