Skip to content

Commit

Permalink
Issue 350
Browse files Browse the repository at this point in the history
  • Loading branch information
Mallikarjunarao Kosuri committed Oct 30, 2016
1 parent 5287520 commit 0e6aaf3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ venv
*.pyc
*.swp
*.egg-info
*.egg/*

# Database files
*.sqlite3
Expand Down
7 changes: 7 additions & 0 deletions chatterbot/utils/word_net.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,15 @@ class Wordnet():
def __init__(self):
from nltk.data import find
from nltk import download
import os

try:
if os.name == 'nt':
nltk.data.path.append(os.path.join(os.getenv('APPDATA',
'nltk_data')))
else:
nltk.data.path.append(os.path.join(os.path.expanduser('~'),
'nltk_data'))
find('wordnet.zip')
except LookupError:
download('wordnet')
Expand Down

0 comments on commit 0e6aaf3

Please sign in to comment.