ducho.multimodal.textual package
ducho.multimodal.textual.TextualFeatureExtractor module
- class ducho.multimodal.textual.TextualFeatureExtractor.TextualFeatureExtractor(gpu='-1')[source]
Bases:
FeatureExtractorFatherThis class represents the Textual Feature Extractor utilized for feature extraction.
- extract_feature(sample_input)[source]
This function extracts features from the input text. Prior to calling this function, the framework, model, and layer have to be configured using their respective set methods.
- Parameters:
sample_input – The preprocessed textual data.
- Returns:
A numpy array representing the extracted features, which will be stored in a .npy file using the appropriate method of the Dataset Class.
ducho.multimodal.textual.TextualDataset module
- class ducho.multimodal.textual.TextualDataset.TextualDataset(input_directory_path, output_directory_path, columns=None)[source]
Bases:
DatasetFatherThis class represents the Textual Dataset used for the data loading process.
- create_output_file(index, extracted_data, model_layer, fusion=None)[source]
Overwrites the method of the Father class because all the Strings come from the same file, and it only changes the row.
- Parameters:
index – It indicates the row of the String.
extracted_data – The output to put in the file.
model_layer – The layer used, it is a String, it will be shown on the final name.
fusion – Fusion is not used for TextualDataset’s objects.
- Returns:
None