Halliday & Matthiessen (1999: 568-9):
The folk notion of the “word” is really a conflation of two different abstractions, one lexical and one grammatical.
(i) Vocabulary (lexis): the word as lexical item, or "lexeme". This is construed as an isolate, a 'thing' that can be counted and sorted in (alphabetical) order. People "look for" words, they "put thoughts into" them, "put them into" or "take them out of another's", and nowadays they keep collections of words on their shelves or in their computers in the form of dictionaries. Specialist knowledge is thought of as a matter of terminology. The taxonomic organisation of vocabulary is less exposed: it is made explicit in Roget's Thesaurus, but is only implicit in a standard dictionary. Lexical taxonomy was the first area of language to be systematically studied by anthropologists, when they began to explore cultural knowledge as it is embodied in folk taxonomies of plants, animals, diseases and the like.
(ii) Grammar: the word as one of the ranks in the grammatical system. This is, not surprisingly, where Western linguistic theory as we know it today began in classical times, with the study of words varying in form according to their case, number, aspect, person etc.. Word-based systems such as these do provide a way in to studying grammatical semantics: but the meanings they construe are always more complex than the categories that appear as formal variants, and grammarians have had to become aware of covert patterns.