The invention comprises systems and methods for the assessment of mental state by means of analysis of key words or phrases written or spoken by a subject. These elements are detected for instance through use of a smartphone app and/or bespoke software keyboard, and their occurrence is logged and analyzed, either locally or remotely. Text and speech may both be analyzed for purposes of the invention, which analyzes key words/phrases for example in terms of their emotional or psychological content, for example counting expressions of positive or negative feelings, attitudes, or other categories. By analysis of frequency of such usages, an estimate or reflection of mental state of the typist is built. Diagnosis of various conditions may thus be carried out, especially by watching how the frequencies and/or percentages of such key elements change over time.