facebookresearch / text-simplification-evaluation
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 141 units with 888 lines of code in units (78.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (75 lines of code)
    • 21 small units (312 lines of code)
    • 117 very small units (501 lines of code)
0% | 0% | 8% | 35% | 56%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 8% | 35% | 56%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
tseval0% | 0% | 9% | 28% | 62%
tseval/utils0% | 0% | 13% | 25% | 61%
tseval/evaluation0% | 0% | 0% | 62% | 37%
tseval/models0% | 0% | 0% | 68% | 32%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def extract()
in tseval/utils/resources_utils.py
27 5 2
24 2 3
24 12 1
def word_probs()
in tseval/models/language_models.py
20 6 6
def get_sentence_feature_extractors()
in tseval/feature_extraction.py
20 1 0
def load_fasttext_embeddings()
in tseval/embeddings.py
19 9 1
def parse_terp_file()
in tseval/evaluation/terp.py
19 4 1
18 1 2
def get_nltk_bleu_methods()
in tseval/feature_extraction.py
17 3 0
def get_lcs()
in tseval/feature_extraction.py
15 5 2
def get_quest_vectorizers()
in tseval/evaluation/quest.py
15 3 0
14 1 3
14 1 3
def _prepare_qats2016()
in tseval/utils/prepare.py
14 2 0
def init_fairseq_lm_globals()
in tseval/models/language_models.py
14 2 0
def get_nlgeval_methods()
in tseval/feature_extraction.py
14 2 0
def get_terp_features_on_qats_pair()
in tseval/evaluation/terp.py
14 3 2
def get_terp_vectorizers()
in tseval/evaluation/terp.py
14 3 0
def get_quest_features_on_qats_pair()
in tseval/evaluation/quest.py
14 3 2
def _prepare_fairseq_lm()
in tseval/utils/prepare.py
13 4 0