File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 318318 "comment" : "\n " .join (
319319 [
320320 "# The stopwords variable defines a file path containing a list of words (one word per line) used for filtering out words" ,
321- "# in the collocation report. The file must be located in the defined path. If the file is not found," ,
321+ "# in the collocation report. If only a filename is provided, it will look for the file in the /data directory." ,
322+ "# The file must be located in the defined path. If the file is not found," ,
322323 "# no option for using a stopword list will be displayed in collocation searches." ,
323324 ]
324325 ),
Original file line number Diff line number Diff line change 1515from json import dump
1616import csv
1717
18- import lxml
18+ import lxml . etree
1919import regex as re
2020from black import FileMode , format_str
2121from multiprocess import Pool
@@ -142,7 +142,7 @@ def __init__(self, **loader_options):
142142 already_configured_values = {}
143143 for attribute in dir (config_obj ):
144144 if not attribute .startswith ("__" ) and not isinstance (
145- getattr (config_obj , attribute ), collections .Callable
145+ getattr (config_obj , attribute ), collections .abc . Callable
146146 ):
147147 already_configured_values [attribute ] = getattr (config_obj , attribute )
148148 with open (load_config_path , "a" ) as load_config_copy :
Original file line number Diff line number Diff line change @@ -126,10 +126,14 @@ def extract_bytes(hit):
126126def build_filter_list (request , config ):
127127 """set up filtering with stopwords or most frequent terms."""
128128 if config .stopwords and request .colloc_filter_choice == "stopwords" :
129- if os .path .isabs (config .stopwords ):
129+ if config .stopwords and "/" not in config .stopwords :
130+ filter_file = os .path .join (config .db_path , "data" , config .stopwords )
131+ elif os .path .isabs (config .stopwords ):
130132 filter_file = config .stopwords
131133 else :
132134 return ["stopwords list not found" ]
135+ if not os .path .exists (filter_file ):
136+ return ["stopwords list not found" ]
133137 filter_num = float ("inf" )
134138 else :
135139 filter_file = config .db_path + "/data/frequencies/word_frequencies"
Original file line number Diff line number Diff line change @@ -1098,7 +1098,7 @@ body {
10981098 vertical-align : 0.3em ;
10991099 font-size : 0.7em ;
11001100 background-color : $button-color ;
1101- color : #fff ;
1101+ color : #fff !important ;
11021102 padding : 0 0.2rem ;
11031103 border-radius : 50% ;
11041104}
You can’t perform that action at this time.
0 commit comments