(keyword)
| 8 | |
| 9 | |
| 10 | def _compile_regex(keyword): |
| 11 | # Surround the keyword with word boundaries and replace interior whitespace |
| 12 | # with whitespace wildcards |
| 13 | pattern = "\\b" + white_space_regex.sub(r"\\s+", keyword) + "\\b" |
| 14 | return re.compile(pattern, re.MULTILINE | re.IGNORECASE) |
| 15 | |
| 16 | |
| 17 | class PrevalenceCounter: |