Skip to content

Commit 2903bdc

Browse files
committed
Drop PY3 data folder
1 parent 96ee715 commit 2903bdc

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

nltk/data.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
from zlib import Z_FINISH as FLUSH
5353

5454
from nltk import grammar, sem
55-
from nltk.compat import add_py3_data, py3_data
5655
from nltk.internals import deprecated
5756

5857
textwrap_indent = functools.partial(textwrap.indent, prefix=" ")
@@ -300,7 +299,6 @@ class FileSystemPathPointer(PathPointer, str):
300299
directly via a given absolute path.
301300
"""
302301

303-
@py3_data
304302
def __init__(self, _path):
305303
"""
306304
Create a new path pointer for the given absolute path.
@@ -349,7 +347,6 @@ class BufferedGzipFile(GzipFile):
349347
Python versions.
350348
"""
351349

352-
@py3_data
353350
def __init__(
354351
self, filename=None, mode=None, compresslevel=9, fileobj=None, **kwargs
355352
):
@@ -382,7 +379,6 @@ class ZipFilePathPointer(PathPointer):
382379
which can be accessed by reading that zipfile.
383380
"""
384381

385-
@py3_data
386382
def __init__(self, zipfile, entry=""):
387383
"""
388384
Create a new path pointer pointing at the specified entry
@@ -791,7 +787,6 @@ def load(
791787
:param encoding: the encoding of the input; only used for text formats.
792788
"""
793789
resource_url = normalize_resource_url(resource_url)
794-
resource_url = add_py3_data(resource_url)
795790

796791
# Determine the format of the resource.
797792
if format == "auto":
@@ -818,7 +813,6 @@ def load(
818813
print(f"<<Using cached copy of {resource_url}>>")
819814
return resource_val
820815

821-
resource_url = normalize_resource_url(resource_url)
822816
protocol, path_ = split_resource_url(resource_url)
823817

824818
if path_[-7:] == ".pickle":
@@ -979,7 +973,7 @@ def _open(resource_url):
979973

980974

981975
class LazyLoader:
982-
@py3_data
976+
983977
def __init__(self, _path):
984978
self._path = _path
985979

@@ -1020,7 +1014,6 @@ class OpenOnDemandZipFile(zipfile.ZipFile):
10201014
read-only (i.e. ``write()`` and ``writestr()`` are disabled.
10211015
"""
10221016

1023-
@py3_data
10241017
def __init__(self, filename):
10251018
if not isinstance(filename, str):
10261019
raise TypeError("ReopenableZipFile filename must be a string")
@@ -1077,7 +1070,6 @@ class SeekableUnicodeStreamReader:
10771070

10781071
DEBUG = True # : If true, then perform extra sanity checks.
10791072

1080-
@py3_data
10811073
def __init__(self, stream, encoding, errors="strict"):
10821074
# Rewind the stream to its beginning.
10831075
stream.seek(0)

0 commit comments

Comments
 (0)