File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,14 @@ def setup_class(self):
48
48
"averaged_perceptron_tagger" ,
49
49
download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
50
50
)
51
+ nltk .download (
52
+ "averaged_perceptron_tagger_eng" ,
53
+ download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
54
+ )
55
+ nltk .download (
56
+ "punkt_tab" ,
57
+ download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
58
+ )
51
59
52
60
def test_basic_string_methods (self ):
53
61
s = ADSString ("HELLO WORLD" )
@@ -62,10 +70,6 @@ def test_basic_string_methods(self):
62
70
assert s3 == s and isinstance (s3 , ADSString )
63
71
64
72
def test_nlp_methods (self ):
65
- import nltk
66
-
67
- nltk .download ("punkt_tab" )
68
-
69
73
ADSString .nlp_backend ("nltk" )
70
74
s = ADSString ("Walking my dog on a breezy day is the best way to recharge." )
71
75
assert list (s .adjective ) == ["breezy" , "best" ]
Original file line number Diff line number Diff line change @@ -45,6 +45,14 @@ def setup_class(self):
45
45
"averaged_perceptron_tagger" ,
46
46
download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
47
47
)
48
+ nltk .download (
49
+ "averaged_perceptron_tagger_eng" ,
50
+ download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
51
+ )
52
+ nltk .download (
53
+ "punkt_tab" ,
54
+ download_dir = os .environ ["CONDA_PREFIX" ] + "/nltk" ,
55
+ )
48
56
49
57
def test_datatime_type (self ):
50
58
assert (
You can’t perform that action at this time.
0 commit comments