Skip to content

Instantly share code, notes, and snippets.

@ameasure
Created August 14, 2014 19:48
Show Gist options
  • Save ameasure/c74272cd628fa3a9cbe4 to your computer and use it in GitHub Desktop.
Save ameasure/c74272cd628fa3a9cbe4 to your computer and use it in GitHub Desktop.
Simple rule based foot injury autocoder
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