def transform_text(tokenizer, df):
    if isinstance(tokenizer, str):
        tokenizer = load_tokenizer(tokenizer)
    X_input = tokenizer.texts_to_sequences(df['link'].values)
    X_input = pad_sequences(X_input, maxlen=config.MAX_LINK_SEQUENCE_LENGTH)
    X_meta = tokenizer.texts_to_sequences(df['meta_data'].values)
    X_meta = pad_sequences(X_meta, maxlen=config.MAX_META_SEQUENCE_LENGTH)
    X_title = tokenizer.texts_to_sequences(df['title'].values)
    X_title = pad_sequences(X_title, maxlen=config.MAX_TITLE_SEQUENCE_LENGTH)
    X_body = tokenizer.texts_to_sequences(df['body'].values)
    X_body = pad_sequences(X_body, maxlen=config.MAX_BODY_SEQUENCE_LENGTH)
    covid_word_count = df['covid_word_count'].values
    covid_word_count_url = df['covid_word_count_url'].values
    restriction_word_count = df['restriction_word_count'].values
    restriction_word_count_url = df['restriction_word_count_url'].values
    X_input = np.concatenate([X_input, X_meta], axis=(- 1))
    X_input = np.concatenate([X_input, X_title], axis=(- 1))
    X_input = np.concatenate([X_input, X_body], axis=(- 1))
    covid_word_count = np.expand_dims(covid_word_count, axis=(- 1))
    X_input = np.concatenate([X_input, covid_word_count], axis=(- 1))
    covid_word_count_url = np.expand_dims(covid_word_count_url, axis=(- 1))
    X_input = np.concatenate([X_input, covid_word_count_url], axis=(- 1))
    restriction_word_count = np.expand_dims(restriction_word_count, axis=(- 1))
    X_input = np.concatenate([X_input, restriction_word_count], axis=(- 1))
    restriction_word_count_url = np.expand_dims(restriction_word_count_url, axis=(- 1))
    X_input = np.concatenate([X_input, restriction_word_count_url], axis=(- 1))
    return X_input
def transform_text(tokenizer, df):
    if isinstance(tokenizer, str):
        tokenizer = load_tokenizer(tokenizer)
    X_input = tokenizer.texts_to_sequences(df['link'].values)
    X_input = pad_sequences(X_input, maxlen=config.MAX_LINK_SEQUENCE_LENGTH)
    X_meta = tokenizer.texts_to_sequences(df['meta_data'].values)
    X_meta = pad_sequences(X_meta, maxlen=config.MAX_META_SEQUENCE_LENGTH)
    X_title = tokenizer.texts_to_sequences(df['title'].values)
    X_title = pad_sequences(X_title, maxlen=config.MAX_TITLE_SEQUENCE_LENGTH)
    X_body = tokenizer.texts_to_sequences(df['body'].values)
    X_body = pad_sequences(X_body, maxlen=config.MAX_BODY_SEQUENCE_LENGTH)
    covid_word_count = df['covid_word_count'].values
    covid_word_count_url = df['covid_word_count_url'].values
    restriction_word_count = df['restriction_word_count'].values
    restriction_word_count_url = df['restriction_word_count_url'].values
    X_input = np.concatenate([X_input, X_meta], axis=(- 1))
    X_input = np.concatenate([X_input, X_title], axis=(- 1))
    X_input = np.concatenate([X_input, X_body], axis=(- 1))
    covid_word_count = np.expand_dims(covid_word_count, axis=(- 1))
    X_input = np.concatenate([X_input, covid_word_count], axis=(- 1))
    covid_word_count_url = np.expand_dims(covid_word_count_url, axis=(- 1))
    X_input = np.concatenate([X_input, covid_word_count_url], axis=(- 1))
    restriction_word_count = np.expand_dims(restriction_word_count, axis=(- 1))
    X_input = np.concatenate([X_input, restriction_word_count], axis=(- 1))
    restriction_word_count_url = np.expand_dims(restriction_word_count_url, axis=(- 1))
    X_input = np.concatenate([X_input, restriction_word_count_url], axis=(- 1))
    return X_input