In addition to semantic content, affect conveyed by text plays an important role for rich and friendly communication. This is particularly true in human communication. In recent days, the percentage of human-computer and computer-mediated communications is increasing in our life. In this situation, a computer is expected to understand the affects or emotions included in text. We have been working on this problem, i.e., textual affect sensing, for some years. As a related topic, textual sentiment analysis has been studied, where positive and negative sentences are typically extracted for Web opinion mining with respect to a specific issue or product. While the distinction between affect sensing and sentiment analysis is not necessarily clear in this field, I call here sentiment analysis when a sentence is classified into positive, negative or neutral one. Unlike this sort of sentiment analysis, our textual affect sensing detects more detailed affective or emotional states appearing in text, such as happy, sad, anger, fear, disgust, surprise and much more. We basically have developed the following two such models or systems so far: (A) The first one detects nine emotions using a set of rules implemented on the basis of a compositionality principle proposed for textual affect interpretation. This process includes symbolic cue processing, detection and transformation of abbreviations, sentence parsing, and word/phrase/sentence-level analyses. (B) The second one challenged to recognize 22 emotion types defined in the OCC (Ortony, Clore & Collins) emotion model, which is the most comprehensive emotion model and employs several cognitive variables including one relating to valenced reactions of events or agents. In this research, we have shown how these cognitive variables of the emotion model can be computed from linguistic components in text.