BLKSerene/Wordless

View on GitHub
wordless/wl_nlp/wl_dependency_parsing.py

Summary

Maintainability
C
1 day
Test Coverage

Function wl_dependency_parse_fig_text has 10 arguments (exceeds 4 allowed). Consider refactoring.
Open

def wl_dependency_parse_fig_text(
Severity: Major
Found in wordless/wl_nlp/wl_dependency_parsing.py - About 1 hr to fix

    Function wl_dependency_parse_fig has 10 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def wl_dependency_parse_fig(
    Severity: Major
    Found in wordless/wl_nlp/wl_dependency_parsing.py - About 1 hr to fix

      Function wl_dependency_parse_fig_tokens has 10 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      def wl_dependency_parse_fig_tokens(
      Severity: Major
      Found in wordless/wl_nlp/wl_dependency_parsing.py - About 1 hr to fix

        Avoid deeply nested control flow statements.
        Open

                            for sentence in doc.sents:
                                displacy_dict = spacy.displacy.parse_deps(sentence, options = options)
        
                                if token_properties:
                                    for token, word in zip(sentence, displacy_dict['words']):
        Severity: Major
        Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                              if token_properties:
                                  i_tag_start += len(doc)
          
          
          Severity: Major
          Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                for sentence in doc.sents:
                                    displacy_dict = spacy.displacy.parse_deps(sentence, options = options)
            
                                    if token_properties:
                                        for token, word in zip(sentence, displacy_dict['words']):
            Severity: Major
            Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                  if token_properties:
                                      i_tag_start += len(doc)
                          else:
              Severity: Major
              Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                    for sentence in doc.sents:
                                        htmls.append(spacy.displacy.render(
                                            sentence,
                                            style = 'dep',
                                            minify = True,
                Severity: Major
                Found in wordless/wl_nlp/wl_dependency_parsing.py - About 45 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

                    There are no issues that match your filters.

                    Category
                    Status