File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 3
3
4
4
from setuptools import setup
5
5
6
-
7
6
setup (
8
7
name = "text_preprocessing" ,
9
- version = "1.0" ,
8
+ version = "1.0.5 " ,
10
9
author = "The ARTFL Project" ,
11
10
author_email = "clovisgladstone@gmail.com" ,
12
11
packages = ["text_preprocessing" , "text_preprocessing.lang" ],
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ def __init__(
78
78
ents_to_keep : list [str ] | bool = False ,
79
79
post_processing_function : Callable | None = None ,
80
80
nlp_model : Language | None = None ,
81
+ using_gpu : bool = False ,
81
82
** _ , # this is meant to make the constructor accept invalid keywords
82
83
):
83
84
self .normalize_options = {
@@ -95,16 +96,18 @@ def __init__(
95
96
"ents_to_keep" : ents_to_keep or [],
96
97
}
97
98
self .language = language
99
+ self .using_gpu = using_gpu
98
100
if nlp_model is not None :
99
101
self .nlp = nlp_model
100
102
else :
101
103
self .nlp , using_gpu = load_language_model (self .language , self .normalize_options )
104
+ self .using_gpu = using_gpu
102
105
if workers is None :
103
106
cpu_count = os .cpu_count () or 2
104
107
self .workers = cpu_count - 1
105
108
else :
106
109
self .workers = workers
107
- if using_gpu is True :
110
+ if self . using_gpu is True :
108
111
self .workers = 1
109
112
ngrams = ngrams or 0
110
113
if ngrams :
You can’t perform that action at this time.
0 commit comments