-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathPreProcessing.py
More file actions
33 lines (30 loc) · 915 Bytes
/
Copy pathPreProcessing.py
File metadata and controls
33 lines (30 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -*- coding: utf-8 -*-
"""Pre-processing module for HMM cipher breaking.
This module re-exports functions from utils.py for backward compatibility.
The main preprocessing functions (corpus generation, alphabet mappings,
encoding, encryption) are defined in utils.py.
"""
import numpy as np
# Re-export preprocessing functions from utils
from utils import (
generate_training_corpus,
compute_frequency_distribution,
initialize_emission_frequency_based,
get_observation_frequency,
create_alphabet_mappings,
encode_text,
generate_substitution_key,
encrypt_text,
train_hmm_parameters,
)
__all__ = [
'generate_training_corpus',
'compute_frequency_distribution',
'initialize_emission_frequency_based',
'get_observation_frequency',
'create_alphabet_mappings',
'encode_text',
'generate_substitution_key',
'encrypt_text',
'train_hmm_parameters',
]