matchzoo.preprocessors.cdssm_preprocessor
¶
CDSSM Preprocessor.
Module Contents¶
-
class
matchzoo.preprocessors.cdssm_preprocessor.
CDSSMPreprocessor
(truncated_mode:str='pre', truncated_length_left:int=10, truncated_length_right:int=40, with_word_hashing:bool=True)¶ Bases:
matchzoo.engine.base_preprocessor.BasePreprocessor
CDSSM Model preprocessor.
-
with_word_hashing
¶ with_word_hashing getter.
-
fit
(self, data_pack:DataPack, verbose:int=1)¶ Fit pre-processing context for transformation.
Parameters: - verbose – Verbosity.
- data_pack – Data_pack to be preprocessed.
Returns: class:CDSSMPreprocessor instance.
-
transform
(self, data_pack:DataPack, verbose:int=1)¶ Apply transformation on data, create letter-ngram representation.
Parameters: - data_pack – Inputs to be preprocessed.
- verbose – Verbosity.
Returns: Transformed data as
DataPack
object.
-
classmethod
_default_units
(cls)¶ Prepare needed process units.
-