Showing 204 of 204 total issues
Function z_score_berry_rogghe
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def z_score_berry_rogghe(main, o11s, o12s, o21s, o22s, span):
Avoid deeply nested control flow statements. Open
Open
for lang, syllabified_form in syls_tokens[token].items():
lang_text = wl_conversion.to_lang_text(self.main, lang)
token_syllabified_forms.append(f"{syllabified_form} [{lang_text}]")
Avoid deeply nested control flow statements. Open
Open
if settings_limit_searching == _tr('wl_collocation_extractor', 'Within sentence segments'):
offsets_unit = offsets_sentence_segs
len_unit = len_sentence_segs
elif settings_limit_searching == _tr('wl_collocation_extractor', 'Within sentences'):
offsets_unit = offsets_sentences
Avoid deeply nested control flow statements. Open
Open
if settings_limit_searching == _tr('wl_collocation_extractor', 'None'):
tokens_right = tokens[i + ngram_size + window_left - 1 : i + ngram_size + window_right]
else:
# Span positions (Right)
for position in range(i + ngram_size + window_left - 1, i + ngram_size + window_right):
Avoid deeply nested control flow statements. Open
Open
if token_syllabified == _tr('wl_wordlist_generator', 'No language support'):
self.set_item_err(i, 2, token_syllabified, alignment_hor = 'left')
else:
self.model().setItem(i, 2, wl_tables.Wl_Table_Item(token_syllabified))
# Same token found in more than one language
Function __init__
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Avoid deeply nested control flow statements. Open
Open
for j, collocate in enumerate(reversed(tokens_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
with open(file_settings_display_lang, 'wb') as f:
pickle.dump(action.lang, f)
# Remove settings file
if os.path.exists(file_settings):
Avoid deeply nested control flow statements. Open
Open
for j, collocate in enumerate(tokens_right):
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
if os.path.exists(file_settings):
os.remove(file_settings)
# Remove file caches
for file in glob.glob(os.path.join(
Avoid deeply nested control flow statements. Open
Open
if settings_limit_searching == _tr('wl_collocation_extractor', 'None'):
tokens_left = tokens[max(0, i + window_left) : i]
tokens_right = tokens[i + ngram_size : i + ngram_size + window_right]
else:
# Span positions (Left)
Consider simplifying this complex logical expression. Open
Open
if (
token_settings.get('apply_lemmatization', False)
or search_settings['match_inflected_forms']
or (
search_settings['context_settings']['incl']['incl']
Function match_search_terms_context
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def match_search_terms_context(
Function check_context
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def check_context(
Function wl_dependency_parse
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def wl_dependency_parse(main, inputs, lang, dependency_parser = 'default', force = False):
Function set_item_err
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_item_err(self, row, col, text, alignment_hor = 'center'):
Function match_tokens
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def match_tokens(
Function __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def __init__(
Function set_item_num
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def set_item_num(self, row, col, val, total = -1):
Function match_search_terms_tokens
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def match_search_terms_tokens(