Home | Trees | Indices | Help |
|
---|
|
1 # Natural Language Toolkit: Word List Corpus Reader 2 # 3 # Copyright (C) 2001-2008 NLTK Project 4 # Author: Steven Bird <[email protected]> 5 # Edward Loper <[email protected]> 6 # URL: <http://nltk.org> 7 # For license information, see LICENSE.TXT 8 9 from nltk.corpus.reader.util import * 10 from nltk.corpus.reader.api import * 11 from nltk.internals import deprecated 12 from nltk.tokenize import line_tokenize 1315 """ 16 List of words, one per line. Blank lines are ignored. 17 """ 2035 #} 3622 if files is None: files = self._files 23 elif isinstance(files, basestring): files = [files] 24 return concat([self.open(f).read() for f in files])25 26 #{ Deprecated since 0.8 27 @deprecated("Use .raw() or .words() instead.")29 if format == 'raw': return self.raw(items) 30 if format == 'listed': return self.words(items) 31 raise ValueError('bad format %r' % format)32 @deprecated("Use .words() instead.")
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Wed Aug 27 15:09:17 2008 | http://epydoc.sourceforge.net |