Showing 205 of 205 total issues
Avoid deeply nested control flow statements. Open
Open
for j, collocate in enumerate(reversed(tags_left)):
if wl_matching.check_context(
i, tokens,
context_settings = settings['search_settings']['context_settings'],
search_terms_incl = search_terms_incl,
Avoid deeply nested control flow statements. Open
Open
for sentence in wl_sentence_tokenization.wl_sentence_split(self.main, para):
self.tokens_multilevel[-1].append([])
for sentence_seg in wl_sentence_tokenization.wl_sentence_seg_tokenize_tokens(
self.main,
Avoid deeply nested control flow statements. Open
Open
for tag in re.finditer(re_tags, para):
tags_tokens = self.add_tags_splitting(para[i_tag_end:tag.start()], tags_tokens)
tags_tokens[-1].append(tag.group())
i_tag_end = tag.end()
Avoid deeply nested control flow statements. Open
Open
for sentence in doc.sentences:
for token in sentence.words:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Avoid deeply nested control flow statements. Open
Open
for j in range(11):
self.set_item_err(row + j, i, text = self.tr('No language support'), alignment_hor = 'right')
Avoid deeply nested control flow statements. Open
Open
if not self.isRowHidden(row):
item = self.model().item(row, col)
val_cum += item.val
item.setText(str(val_cum))
Function wl_spin_boxes_min_max_sync
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def wl_spin_boxes_min_max_sync(
Avoid deeply nested control flow statements. Open
Open
for lang, trs in TRS_LANGS.items():
# Language names
if tr == lang:
tr = trs[0]
elif f'{lang} (' in tr:
Avoid deeply nested control flow statements. Open
Open
if settings_limit_searching == _tr('Wl_Worker_Colligation_Extractor', 'Within sentence segments'):
offsets_unit = offsets_sentence_segs
len_unit = len_sentence_segs
elif settings_limit_searching == _tr('Wl_Worker_Colligation_Extractor', 'Within sentences'):
offsets_unit = offsets_sentences
Avoid deeply nested control flow statements. Open
Open
for sentence in wl_sentence_tokenization.wl_sentence_split(self.main, text_no_tags):
self.tokens_multilevel[-1].append([])
for sentence_seg in wl_sentence_tokenization.wl_sentence_seg_tokenize_tokens(
self.main,
Avoid deeply nested control flow statements. Open
Open
if re_match(search_term, dependency_relation.display_text(), flags = re_flags):
search_results.add(dependency_relation)
else:
Avoid deeply nested control flow statements. Open
Open
for doc in nlp.pipe(docs):
for token in doc:
texts_tagged.append(token.text)
if tagset in ['default', 'raw']:
Avoid deeply nested control flow statements. Open
Open
if text.lang in self.main.settings_global['sentiment_analyzers']:
sentiment_inputs.append(' '.join(
[*left_tokens_search, *node_tokens_search, *right_tokens_search]
))
Avoid deeply nested control flow statements. Open
Open
if (
ngram in search_terms
and wl_matching.check_context(
j, tokens,
context_settings = settings['search_settings']['context_settings'],
Avoid deeply nested control flow statements. Open
Open
if not self.isRowHidden(row):
item = self.model().item(row, col)
item.setText(f'{item.val:.{precision_pcts}%}')
elif self.header_orientation == 'vert':
Avoid deeply nested control flow statements. Open
Open
for k, ngram in enumerate(wl_nlp_utils.ngrams(tokens, len_search_term)):
if ngram == search_term:
points.append([x_start + k / text.num_tokens * len_tokens_total, y_start - j])
# Total
points.append([x_start_total + k, 0])
Avoid deeply nested control flow statements. Open
Open
if (
(
(
not settings['search_settings']['match_dependency_relations']
and (token in search_terms or head in search_terms)
Avoid deeply nested control flow statements. Open
Open
for collocate in range(10):
collocate = wl_texts.Wl_Token(str(collocate))
stat_files_items[(node, collocate)] = [
random.uniform(0, val_max),
random.uniform(0, val_max),
Avoid deeply nested control flow statements. Open
Open
if token.lemma is not None:
lemmas.append(token.lemma)
else:
lemmas.append(token.text)
else:
Avoid deeply nested control flow statements. Open
Open
if token_properties:
i_tag_start += len(doc)
else: