Showing 383 of 4,191 total issues
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function __init__
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function stem
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def stem(self, word: str) -> str:
"""Return 'CLEF German stemmer plus' stem.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function encode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: str) -> str:
"""Return the Roger Root code for a word.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function encode
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: str) -> str:
"""Return Reth-Schek Phonetik code for a word.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _apply_rule
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def _apply_rule(
self,
word: str,
rule: Tuple[bool, int, Optional[str], bool],
intact: bool,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sim
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def sim(self, src: str, tar: str) -> float:
"""Return the MLIPNS similarity of two strings.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sim_score
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
def sim_score(self, src: str, tar: str) -> float:
"""Return the Dunning similarity of two strings.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function stem
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def stem(self, word: str) -> str:
"""Return Caumanns German stem.
Parameters
----------
Function dist_abs
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
def dist_abs(self, src: str, tar: str) -> float:
"""Return the Meta-Levenshtein distance of two strings.
Parameters
----------
Consider simplifying this complex logical expression. Open
if (current > 0) and not _is_vowel(current - 1):
primary, secondary = _metaph_add('K')
current += 2
continue
Consider simplifying this complex logical expression. Open
if _string_at(current, 4, {'JOSE'}) or _string_at(
0, 4, {'SAN '}
):
if (
(current == 0) and (_get_at(current + 4) == ' ')
Consider simplifying this complex logical expression. Open
if (
(not src_len_fn and not tar_len_fn)
or (tar_fn and src_fn.startswith(tar_fn))
or (src_fn and tar_fn.startswith(src_fn))
) and not roman_conflict:
Function _default_download_dir
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _default_download_dir() -> Optional[str]:
"""Return the directory to which packages will be downloaded by default.
This is mostly copied from NLTK's
nltk.downloader.Downloader.default_download_dir
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function encode
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: str) -> str:
"""Return the SoundexBR encoding of a word.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sim
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def sim(self, src: str, tar: str) -> float:
"""Return the Steffensen similarity of two strings.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function dist
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def dist(self, src: str, tar: str) -> float:
"""Return the INClusion Programme value of two words.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function _fuzzy_intersection
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def _fuzzy_intersection(self) -> TCounter[str]:
r"""Return the fuzzy intersection of the tokens in src and tar.
This implements the fuzzy intersection defined by :cite:`Wang:2014`.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function sim
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def sim(self, src: str, tar: str) -> float:
"""Return Cao's CY similarity (CYs) of two strings.
Parameters
----------
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function ipa_to_features
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def ipa_to_features(ipa: str) -> List[int]:
"""Convert IPA to features.
This translates an IPA string of one or more phones to a list of ints
representing the features of the string.
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"