UAnew is a URBI module implementing ANEW with word search functionality. ANEW (Affective Norms for English Words) is a database containing valence (pleasure), arousal and dominance ratings for a large number of English words. It can be used for evaluating a word or a set of words in terms of feelings it is associated with by a computer.
The original extended version of the UAnew project for URBI is available via the GitHub repository LINK.
bool = UAnew.new("base.txt") - initialize the module and load database from given file,
UAnew.debug - debug flag used to display additional information, set 1 to display, default value is 0,
bool = UAnew.SetWord("word") - attempts to find "word" in the database and, if successful, assigns values from the database to slots pleasure, arousal, dominance, pleasureSD, arousalSD, dominanceSD, pleasureRat, arousalRat, dominanceRat according to the current category setting; return value: true if the word was found, false otherwise,
UAnew.word - contains the most recent word looked up in the database,
["word1", "word2",...] = UAnew.ClearText("word1 word2") - processes the given input text by extracting words which consist of at least minLettersCount letters and saves them in the returned vector container,
UAnew.minLettersCount - used in ClearText("input text") method, defines the minimal amount of letters for the words from input text to be included in the returned vector container, default value: 3.
UAnew.pleasure - contains the pleasure rating for the current word,
UAnew.pleasureSD - contains the standard deviation value for pleasure rating,
UAnew.pleasureRat - contains the amount of contributing values for pleasure rating,
UAnew.arousal - contains the arousal rating for the current word,
UAnew.arousalSD - contains the standard deviation value for arousal rating,
UAnew.arousalRat - contains the amount of contributing values for arousal rating,
UAnew.dominance - contains the dominance rating for the current word,
UAnew.dominanceSD - contains the standard deviation value for dominance rating,
UAnew.dominanceRat - contains the amount of contributing values for dominance rating,
UAnew.category - category defines the current category choice, all ratings are picked from the database using this setting,
allowed values: "unisex", "male,", "female", "younger", "older", "low_education", "high_education",
default value: "unisex".