Created
August 14, 2014 19:48
-
-
Save ameasure/c74272cd628fa3a9cbe4 to your computer and use it in GitHub Desktop.
Simple rule based foot injury autocoder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
def is_foot_injury(narrative): | |
narrative = narrative.lower() | |
words = re.findall('\w+', narrative) | |
if 'foot' in words: | |
return True | |
elif 'feet' in words: | |
return True | |
else: | |
return False |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment