Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…umpy is installed)

svn/trunk@8489
  • Loading branch information...
commit e81fc7db1164292a991f05970a3f1767ac02018f 1 parent 07558ec
Edward Loper authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 nltk/tokenize/__init__.py
View
7 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):
Please sign in to comment.
Something went wrong with that request. Please try again.