Showing 383 of 4,191 total issues
Lovins
has 35 functions (exceeds 20 allowed). Consider refactoring. Open
class Lovins(_Stemmer):
"""Lovins stemmer.
The Lovins stemmer is described in Julie Beth Lovins's article
:cite:`Lovins:1968`.
Function stem_dict
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def stem_dict(self, word: str) -> Dict[str, str]:
"""Return the stem of a word according to the Schinke stemmer.
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 __init__
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
transforms: Optional[
Union[
Type[_Phonetic],
- 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_abs
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def dist_abs(self, src: str, tar: str) -> float:
"""Return the "simplest" Sift4 distance between two terms.
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 _alignment_matrix
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def _alignment_matrix(
self, src: str, tar: str, backtrace: bool = True
) -> Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]:
"""Return the phonetic edit distance alignment matrix.
- 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 _alignment_matrix
has a Cognitive Complexity of 30 (exceeds 5 allowed). Consider refactoring. Open
def _alignment_matrix(
self, src: str, tar: str, backtrace: bool = True
) -> Union[np.ndarray, Tuple[np.ndarray, np.ndarray]]:
"""Return the Levenshtein alignment matrix.
- 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
File _phonix.py
has 349 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
_TokenDistance
has 34 functions (exceeds 20 allowed). Consider refactoring. Open
class _TokenDistance(_Distance):
r"""Abstract Token Distance class.
.. _confusion_table:
Function encode
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: str) -> str:
"""Return the Norphone code.
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 28 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: str) -> str:
"""Return the IBM Alpha Search Inquiry System code for a word.
A collection is necessary as the return type since there can be
multiple values for a single word. But the collection must be ordered
- 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_abs
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def dist_abs(self, src: str, tar: str) -> float:
"""Return the Editex distance between 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 __init__
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
def __init__(
self,
corpus_text: str = '',
doc_split: str = '\n\n',
sent_split: str = '\n',
- 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 26 (exceeds 5 allowed). Consider refactoring. Open
def encode(self, word: Union[str, Sequence[str]]) -> str:
"""Return the Standardized Phonetic Frequency Code (SPFC) 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 tokenize
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def tokenize(self, string: str) -> 'QGrams':
"""Tokenize the term and store it.
The tokenized term is stored as an ordered list and as a Counter
object.
- 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 tokenize
has a Cognitive Complexity of 26 (exceeds 5 allowed). Consider refactoring. Open
def tokenize(self, string: str) -> 'COrVClusterTokenizer':
"""Tokenize the term and store it.
The tokenized term is stored as an ordered list and as a Counter
object.
- 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
File _sfinx_bis.py
has 315 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
File _porter.py
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
File _levenshtein.py
has 314 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
File _typo.py
has 312 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2018-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
File _porter2.py
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
# Copyright 2014-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by