<commit_before>#-----------------------------------------------------------------------------
# DICOM dictionary stuff


INSTALL_FILES(/include/InsightToolkit/gdcm/ .dic
  dicomV3
  dicomVR
  dicomTS
  DicomDir
)

# Nice trick to avoid creating a .h file each time we compile gdcm
# Since CONFIGURE_FILE do a 'copy if different'
# We have to write the file here since is contains 'DICOM_DICTIONARY'
# Which is a variable afterward...

# Following code contributing by <NAME> (Kitware)
FILE(READ "dicomV3.dic" ENT)
STRING(REGEX REPLACE "\n" ";" ENT "${ENT}")
SET(DICOM_DATA_DICTIONARY "")

FOREACH(line ${ENT})
  STRING(REGEX REPLACE
    "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f]) ([0-9a-f][0-9a-f][0-9a-f][0-9a-f]) ([A-Z]+) ([A-Z?]+) (.*)$"
    "   {0x\\1, 0x\\2, \"\\3\" , \"\\4\" , \"\\5\"}, " nline "${line}")<commit_msg>ENH: fix problem on windows where CTRL-M's are at the end of line<commit_after>#-----------------------------------------------------------------------------
# DICOM dictionary stuff


INSTALL_FILES(/include/InsightToolkit/gdcm/ .dic
  dicomV3
  dicomVR
  dicomTS
  DicomDir
)

# Nice trick to avoid creating a .h file each time we compile gdcm
# Since CONFIGURE_FILE do a 'copy if different'
# We have to write the file here since is contains 'DICOM_DICTIONARY'
# Which is a variable afterward...

# Following code contributing by <NAME> (Kitware)
FILE(READ "dicomV3.dic" ENT)
STRING(REGEX REPLACE "\n" ";" ENT "${ENT}")
SET(DICOM_DATA_DICTIONARY "")

FOREACH(line ${ENT})
  STRING(REGEX REPLACE
    "^([0-9a-f][0-9a-f][0-9a-f][0-9a-f]) ([0-9a-f][0-9a-f][0-9a-f][0-9a-f]) ([A-Z]+) ([A-Z?]+) ([A-Za-z0-9()'/, -]*).*$"
    "   {0x\\1, 0x\\2, \"\\3\" , \"\\4\" , \"\\5\"}, " nline "${line}")
{'fraction_non_alphanumeric': 0.2759226713532513, 'fraction_numerical': 0.03046280023432923, 'mean_word_length': 2.45748987854251, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5089720', 'n_tokens_mistral': 687, 'n_tokens_neox': 676, 'n_words': 164}