SAS DLPy provides the TextClassification class for NLP tasks. When fine-tuning a pre-trained BERT model for sentiment analysis using SAS DLPy, which pre-processing step is required before feeding text to BERT?
Select an answer to reveal the explanation.
Short Explanation and Infographic
Here's the deal — a is correct because BERT requires text to be tokenized with BERT's specific WordPiece tokenizer, producing token IDs, attention masks (distinguishing real tokens from padding), and segment IDs (for sentence pair tasks). This tokenization is fundamental to BERT's architecture.
Full explanation below image
Full Explanation
A is correct because BERT requires text to be tokenized with BERT's specific WordPiece tokenizer, producing token IDs, attention masks (distinguishing real tokens from padding), and segment IDs (for sentence pair tasks). This tokenization is fundamental to BERT's architecture. B is wrong because BERT operates on token sequences, not TF-IDF sparse vectors. C is wrong because BERT uses subword tokenization, not classical stemming/stop word removal. D is wrong because character-level one-hot encoding is not BERT's input format.