MCPcopy Create free account
hub / github.com/aboutcode-org/scancode-toolkit / clean

Function clean

src/summarycode/copyright_tallies.py:363–371  ·  view source on GitHub ↗

Return an updated and cleaned Text object from a `text` Text object normalizing some pucntuations around some name and acronyms.

(text)

Source from the content-addressed store, hash-verified

361
362
363def clean(text):
364 """
365 Return an updated and cleaned Text object from a `text` Text object
366 normalizing some pucntuations around some name and acronyms.
367 """
368 if not text:
369 return text
370 text = text.replace('A. M.', 'A.M.')
371 return text
372
373
374# set of common prefixes that can be trimmed from a name

Callers 1

normalizeMethod · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected