Skip to content
ml-recall

#alternation

1 question from NLP Fundamentals

Timed test

1 question · 1 min · score and explanations at the end

Take a test
Q 1 / 1Score 0 / 0

Question 1: Short answer

hardAI-checkedNLP Fundamentals

A regex tokenizer is meant to keep abbreviations such as "U.S.A." as one token:

import re
t = "The U.S.A. sent 2.5 tons."
print(len(re.findall(r"\w+|(?:[A-Z]\.)+|[^\w\s]", t)))

What does it print?

a whole number