BLKSerene/Wordless

View on GitHub

Showing 204 of 204 total issues

Function z_score_berry_rogghe has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

def z_score_berry_rogghe(main, o11s, o12s, o21s, o22s, span):
Severity: Minor
Found in wordless/wl_measures/wl_measures_statistical_significance.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    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}]")
    
    
    Severity: Major
    Found in wordless/wl_wordlist_generator.py - About 45 mins to fix

      Avoid deeply nested control flow statements.
      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
      Severity: Major
      Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

        Avoid deeply nested control flow statements.
        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):
        Severity: Major
        Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          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
          Severity: Major
          Found in wordless/wl_wordlist_generator.py - About 45 mins to fix

            Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def __init__(
            Severity: Minor
            Found in wordless/wl_dialogs/wl_dialogs.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              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,
              Severity: Major
              Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        with open(file_settings_display_lang, 'wb') as f:
                                            pickle.dump(action.lang, f)
                
                                        # Remove settings file
                                        if os.path.exists(file_settings):
                Severity: Major
                Found in wordless/wl_main.py - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  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,
                  Severity: Major
                  Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                            if os.path.exists(file_settings):
                                                os.remove(file_settings)
                    
                                            # Remove file caches
                                            for file in glob.glob(os.path.join(
                    Severity: Major
                    Found in wordless/wl_main.py - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      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)
                      Severity: Major
                      Found in wordless/wl_collocation_extractor.py - About 45 mins to fix

                        Consider simplifying this complex logical expression.
                        Open

                            if (
                                token_settings.get('apply_lemmatization', False)
                                or search_settings['match_inflected_forms']
                                or (
                                    search_settings['context_settings']['incl']['incl']
                        Severity: Major
                        Found in wordless/wl_nlp/wl_token_processing.py - About 40 mins to fix

                          Function match_search_terms_context has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          def match_search_terms_context(
                          Severity: Minor
                          Found in wordless/wl_nlp/wl_matching.py - About 35 mins to fix

                            Function check_context has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            def check_context(
                            Severity: Minor
                            Found in wordless/wl_nlp/wl_matching.py - About 35 mins to fix

                              Function wl_dependency_parse has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              def wl_dependency_parse(main, inputs, lang, dependency_parser = 'default', force = False):
                              Severity: Minor
                              Found in wordless/wl_nlp/wl_dependency_parsing.py - About 35 mins to fix

                                Function set_item_err has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def set_item_err(self, row, col, text, alignment_hor = 'center'):
                                Severity: Minor
                                Found in wordless/wl_widgets/wl_tables.py - About 35 mins to fix

                                  Function match_tokens has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  def match_tokens(
                                  Severity: Minor
                                  Found in wordless/wl_nlp/wl_matching.py - About 35 mins to fix

                                    Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                        def __init__(
                                    Severity: Minor
                                    Found in wordless/wl_widgets/wl_tables.py - About 35 mins to fix

                                      Function set_item_num has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                      Open

                                          def set_item_num(self, row, col, val, total = -1):
                                      Severity: Minor
                                      Found in wordless/wl_widgets/wl_tables.py - About 35 mins to fix

                                        Function match_search_terms_tokens has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                        Open

                                        def match_search_terms_tokens(
                                        Severity: Minor
                                        Found in wordless/wl_nlp/wl_matching.py - About 35 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language