Permalink
Browse files

improvement to previous checkin (only import tokenize.texttiling if n…

…umpy is installed)

svn/trunk@8489
  • Loading branch information...
Edward Loper
Edward Loper committed Feb 3, 2010
1 parent 07558ec commit e81fc7db1164292a991f05970a3f1767ac02018f
Showing with 3 additions and 4 deletions.
  1. +3 −4 nltk/tokenize/__init__.py
@@ -27,12 +27,11 @@
'TreebankWordTokenizer', 'sent_tokenize', 'word_tokenize',
]
-try:
- import numpy
+try: import numpy
+except ImportError: pass
+else:
from texttiling import *
__all__ += ['TextTilingTokenizer']
-except ImportError:
- pass
# Standard sentence tokenizer.
def sent_tokenize(text):

0 comments on commit e81fc7d

Please sign in to comment.