awslabs / handwritten-text-recognition-for-apache-mxnet
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 185 units with 2,784 lines of code in units (81.6% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (238 lines of code)
    • 45 medium size units (1,420 lines of code)
    • 42 small units (635 lines of code)
    • 94 very small units (491 lines of code)
0% | 8% | 51% | 22% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 8% | 51% | 22% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ocr/utils0% | 8% | 51% | 20% | 20%
ocr0% | 9% | 49% | 30% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run_epoch()
in ocr/word_and_line_segmentation.py
66 14 8
def generate_sequences()
in ocr/utils/denoiser_utils.py
65 20 4
def __init__()
in ocr/utils/iam_dataset.py
54 13 4
def sort_bbs_line_by_line()
in ocr/utils/word_to_line.py
53 8 2
def generate_output_image()
in ocr/word_and_line_segmentation.py
48 2 8
def ctcBeamSearch()
in ocr/utils/beam_search.py
48 14 4
def run_epoch()
in ocr/handwriting_line_recognition.py
47 12 7
def forward()
in ocr/utils/encoder_decoder.py
43 9 4
def __init__()
in ocr/utils/encoder_decoder.py
42 1 13
def __init__()
in ocr/utils/encoder_decoder.py
41 2 15
def __init__()
in ocr/utils/encoder_decoder.py
40 2 15
def _run_sclite()
in ocr/utils/sclite_helper.py
40 6 5
def _change_bb_reference()
in ocr/utils/iam_dataset.py
40 2 7
def _process_subjects()
in ocr/utils/iam_dataset.py
39 6 5
def _get_data()
in ocr/utils/noisy_forms_dataset.py
38 6 1
def hybrid_forward()
in ocr/utils/iou_loss.py
37 1 5
def predict_bounding_boxes()
in ocr/word_and_line_segmentation.py
36 1 6
def _get_data()
in ocr/utils/ngram_dataset.py
36 11 1
def resize_image()
in ocr/utils/iam_dataset.py
35 5 2
def _process_data()
in ocr/utils/iam_dataset.py
35 7 1