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 33
44from setuptools import setup
55
6-
76setup (
87 name = "text_preprocessing" ,
9- version = "1.0" ,
8+ version = "1.0.5 " ,
109 author = "The ARTFL Project" ,
1110 author_email = "clovisgladstone@gmail.com" ,
1211 packages = ["text_preprocessing" , "text_preprocessing.lang" ],
Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ def __init__(
7878 ents_to_keep : list [str ] | bool = False ,
7979 post_processing_function : Callable | None = None ,
8080 nlp_model : Language | None = None ,
81+ using_gpu : bool = False ,
8182 ** _ , # this is meant to make the constructor accept invalid keywords
8283 ):
8384 self .normalize_options = {
@@ -95,16 +96,18 @@ def __init__(
9596 "ents_to_keep" : ents_to_keep or [],
9697 }
9798 self .language = language
99+ self .using_gpu = using_gpu
98100 if nlp_model is not None :
99101 self .nlp = nlp_model
100102 else :
101103 self .nlp , using_gpu = load_language_model (self .language , self .normalize_options )
104+ self .using_gpu = using_gpu
102105 if workers is None :
103106 cpu_count = os .cpu_count () or 2
104107 self .workers = cpu_count - 1
105108 else :
106109 self .workers = workers
107- if using_gpu is True :
110+ if self . using_gpu is True :
108111 self .workers = 1
109112 ngrams = ngrams or 0
110113 if ngrams :
You can’t perform that action at this time.
0 commit comments