In grammar, a part of speech or word class is defined as the role that a word (or sometimes a phrase) plays in a sentence. In transformational-generative grammar, parts of speech are known as lexical categories. There are open word classes, which constantly acquire new members, and closed word classes, which acquire new members infrequently if at all.
Parts of speech are often a tricky subject when dealing with languages other than one's native one(s), since in some cases they do not match as expected. Spanish uses adjectives almost interchangeably as nouns while English cannot; Japanese has two classes of adjectives where English has one; Chinese and Japanese have measure words while European languages have nothing resembling them; many languages don't have a distinction between adjectives and adverbs, or adjectives and nouns, etc. This means that the formal distinctions between parts of speech must be made within the framework of a given language, and should not be carried over to other languages.
In traditional English grammar, which is patterned after Latin grammar, and still taught in schools and used in dictionaries, there are eight parts of speech: noun, verb, adjective, adverb, pronoun, preposition, conjunction, and interjection. Modern grammarians however believe that this list is somewhat simplified and artificial. For example, "adverb" is to some extent a catch-all class that includes words with many different functions.
Common ways of delimiting words by function include:
English is an analytic language and frequently does not mark words as belonging to one part of speech or another. Words like neigh, break, outlaw, laser, microwave and telephone might all be either verb forms or nouns. Although -ly is an adverb marker, not all adverbs end in -ly and not all words ending in -ly are adverbs. For instance, tomorrow, slow, fast, crosswise can all be adverbs, while leisurely, friendly, ugly are all adjectives.
In certain circumstances, even words with primarily grammatical functions can be used as verbs or nouns, as in "We must look to the hows and not just the whys" or "Miranda was to-ing and fro-ing and not paying attention".
In Japanese, several parts of speech are explicitly marked. For example, basic verbs in the plain form always end in -u, and basic verbs in the polite form always end in -masu; i-adjectives (see above) always end -i, and the adverbs derived of those adjectives always end in -ku. However, the mark is not enough to distinguish a part of speech from another (not everything that ends in -u is a verb, etc.).
Japanese parts of speech do not correspond well with the traditional Latin-based ones outlined above. There are two classes of words that may function as adjectives, each with a different morphosyntax. One of them encodes temporal information (as verbs do), while the other patterns with nouns in most respects. Some conjugated forms of verbs, in turn, pattern closely with adjectives.