Telling if a word is a verb in the imperative mood

Solution 1:

To determine if a verb is a command just from its spelling seems problematic. Start with the basic rule: "In English, the imperative is formed using the bare infinitive form of the verb. This is usually also the same as the second-person present indicative form...." (from Wikipedia) So it seems what you're really trying to check is whether the verb that starts the sentence is in the present tense, second person. Since you're only concerned with false negatives, then you need to spot verbs ending in "s" that should be exceptions to your first rule (can't end in "s"). Someone suggested you remove the "s" and analyze what you get. Instead, I would recommend that you add "es" and see if you still have a verb. If so, it has a high probability that the original is something you want. So if you encounter "guess", then check "guesses" (still a verb). If you encounter "guesses", check "guesseses" (not a verb).

Solution 2:

I don't know whether your task is feasible, but it would help to make the test look at whether the verb ends with an inflection (rather than whether it ends with "s"). One property of English inflections is that when you remove them, you get a word that is the base form. So your example "focus" would clearly not pass this test, since "focu" is not a verb.