A dataset comprising text-based messages can be accessed. Tokens for words and punctuation marks contained in the text-based messages can be generated. Each token corresponds to one word or one punctuation mark. A vector representation for each of a plurality of the tokens can be generated using natural language processing. A sequence of tokens corresponding to the text-based message can be generated for each of a plurality of the text-based messages in the dataset. Ones of the tokens that represent punctuation marks can be identified. An artificial neural network can be trained to predict use of the punctuation marks in sentence structures. The training uses the generated sequence of tokens and the vector representations for the tokens, in the sequence of tokens, that represent the punctuation marks.