rxn.metrics.tokenize_file.tokenize_class

rxn.metrics.tokenize_file.tokenize_class(detokenized_class)[source]

Function performing a tokenization of the reaction class used in the Transformer classification model. E.g. ‘1.2.3’ -> ‘1 1.2 1.2.3’

Parameters

detokenized_class (str) – str to tokenize

Raises

ValueError – if the input string format is not correct

Return type

str