BLKSerene/Wordless

View on GitHub
wordless/wl_nlp/wl_lemmatization.py

Summary

Maintainability
A
2 hrs
Test Coverage

Avoid deeply nested control flow statements.
Open

                    if token.lemma is not None:
                        lemmas.append(token.lemma)
                    else:
                        lemmas.append(token.text)
    else:
Severity: Major
Found in wordless/wl_nlp/wl_lemmatization.py - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                        if token.lemma_:
                            lemmas.append(token.lemma_)
                        else:
                            lemmas.append(token.text)
        # Stanza
    Severity: Major
    Found in wordless/wl_nlp/wl_lemmatization.py - About 45 mins to fix

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

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

        Avoid too many return statements within this function.
        Open

                        return inputs
        Severity: Major
        Found in wordless/wl_nlp/wl_lemmatization.py - About 30 mins to fix

          There are no issues that match your filters.

          Category
          Status