Inference
create_noisy_columns
Generate columns for keyless reading from plain data with defined noise range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
str
|
Plain text. |
required |
min_noise |
int
|
Minimum noise range value. |
required |
max_noise |
int
|
Maximum noise range value. |
required |
Returns:
Name | Type | Description |
---|---|---|
columns |
List[str]
|
Columns for keyless reading. |
Source code in src/trecover/utils/inference.py
create_files_noisy_columns
Generate columns for keyless reading from plain data contained in the files with defined noise range.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files |
List[Union[str, Path]]
|
Paths to files that contain plain data to create noised columns for keyless reading. |
required |
min_noise |
int
|
Minimum noise range value. |
required |
max_noise |
int
|
Maximum noise range value. |
required |
n_to_show |
int, default
|
Maximum number of columns. Zero means no restrictions. |
0
|
Returns:
Name | Type | Description |
---|---|---|
files_columns |
List[List[str]]
|
Batch of columns for keyless reading. |
Source code in src/trecover/utils/inference.py
data_to_columns
Clean and split noised data.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
data |
str
|
Noised columns for keyless reading. |
required |
separator |
str, default
|
Separator to split the data into columns. |
' '
|
Returns:
Type | Description |
---|---|
List[str]
|
Columns for keyless reading. |
Source code in src/trecover/utils/inference.py
read_files_columns
Read, clean and split noised data contained in the files.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
files |
List[Union[str, Path]]
|
Paths to files that contain noised data for keyless reading. |
required |
separator |
str
|
Separator to split the data into columns. |
required |
n_to_show |
int, default
|
Maximum number of columns. Zero means no restrictions. |
0
|
Returns:
Name | Type | Description |
---|---|---|
files_columns |
List[List[str]]
|
Batch of columns for keyless reading. |