MCPcopy
hub / github.com/nltk/nltk / readlines

Method readlines

nltk/data.py:1387–1396  ·  view source on GitHub ↗

Read this file's contents, decode them using this reader's encoding, and return it as a list of unicode lines. :rtype: list(unicode) :param sizehint: Ignored. :param keepends: If false, then strip newlines.

(self, sizehint=None, keepends=True)

Source from the content-addressed store, hash-verified

1385 return line
1386
1387 def readlines(self, sizehint=None, keepends=True):
1388 """
1389 Read this file's contents, decode them using this reader's
1390 encoding, and return it as a list of unicode lines.
1391
1392 :rtype: list(unicode)
1393 :param sizehint: Ignored.
1394 :param keepends: If false, then strip newlines.
1395 """
1396 return self.read().splitlines(keepends)
1397
1398 def next(self):
1399 """Return the next decoded line from the underlying stream."""

Callers 7

check_readerFunction · 0.95
tokenize_fileFunction · 0.80
test_corpus_bleuMethod · 0.80
test_sentence_nistMethod · 0.80
_initMethod · 0.80
custom_lemmasMethod · 0.80
read_blockMethod · 0.80

Calls 1

readMethod · 0.95

Tested by 3

check_readerFunction · 0.76
test_corpus_bleuMethod · 0.64
test_sentence_nistMethod · 0.64