The model counts how many times each word appears in each group’s examples. When a new sentence comes in, it looks at its words: each word votes for the group where it showed up more often. This method is called Naive Bayes; early spam filters for email worked this way.
Words change their endings: “laughed”, “laughing”, “laughs”. The model only looks at the first 5 letters of each word (“laugh”), so words with the same start recognise each other.
What you write never leaves this device; the model runs in your browser.
Try this: add only sentences with “very” to one group. Then see what the model says about any sentence with “very”. The model learns the bias in your examples too.