Presentation is loading. Please wait.

Presentation is loading. Please wait.

More Text Analytics National Center for Supercomputing Applications University of Illinois at Urbana-Champaign.

Similar presentations


Presentation on theme: "More Text Analytics National Center for Supercomputing Applications University of Illinois at Urbana-Champaign."— Presentation transcript:

1 More Text Analytics National Center for Supercomputing Applications University of Illinois at Urbana-Champaign

2 Outline Concept Tracking –Emotion Tracking Topic Modeling Hands-On

3 Text Analytics: Concept Tracking Given: Set of documents Given: Set of concepts and related words Find the concepts in the set of documents using the related words and a synonym network Concepts can then be displayed with additional meta data from the documents for timeline, or GIS mapping Specific example is Emotion Tracking

4 SEASR @ Work – Emotion Tracking Goal is to have this type of Visualization to track emotions across a text document (Leveraging flare.prefuse.org)

5 Text Analytics: Emotion Tracking Sentiment Analysis

6 Classifying text based on its sentiment –Determining the attitude of a speaker or a writer –Determining whether a review is positive/negative Ask: What emotion is being conveyed within a body of text? –Look at only adjectives lots of issues and challenges Need to Answer: –What emotions to track? –How to measure/classify an adjective to one of the selected emotions? –How to visualize the results?

7 Sentiment Analysis: Emotion Selection Which emotions: –http://en.wikipedia.org/wiki/List_of_emotionshttp://en.wikipedia.org/wiki/List_of_emotions –http://changingminds.org/explanations/emotions/basic %20emotions.htmhttp://changingminds.org/explanations/emotions/basic %20emotions.htm –http://www.emotionalcompetency.com/recognizing.ht mhttp://www.emotionalcompetency.com/recognizing.ht m Parrot’s classification (2001) –six core emotions –Love, Joy, Surprise, Anger, Sadness, Fear

8 Sentiment Analysis: Emotions

9 Sentiment Analysis: Using Adjectives How to classify adjectives: –Lots of metrics we could use … Lists of adjectives already classified –http://www.derose.net/steve/resources/emotionwor ds/ewords.htmlhttp://www.derose.net/steve/resources/emotionwor ds/ewords.html –Need a “nearness” metric for missing adjectives –How about the thesaurus game ?

10 Ontological Association (WordNet) As of 2006, the database contains about 150,000 words organized in over 115,000 synsets for a total of 207,000 word-sense pairs POSUnique Strings SynsetsTotal Strings Word-Sense Pairs Noun11779882115146312 Verb115291376725047 Adjective214791815630002 Adverb448136215580 Totals155287117659206941

11 Ontological Association (WordNet) Search for table Noun –S: (n) table, tabular array (a set of data arranged in rows and columns) "see table 1” –S: (n) table (a piece of furniture having a smooth flat top that is usually supported by one or more vertical legs) "it was a sturdy table” –S: (n) table (a piece of furniture with tableware for a meal laid out on it) "I reserved a table at my favorite restaurant” –S: (n) mesa, table (flat tableland with steep edges) "the tribe was relatively safe on the mesa but they had to descend into the valley for water” –S: (n) table (a company of people assembled at a table for a meal or game) "he entertained the whole table with his witty remarks” –S: (n) board, table (food or meals in general) "she sets a fine table"; "room and board” Verb –S: (v) postpone, prorogue, hold over, put over, table, shelve, set back, defer, remit, put off (hold back to a later time) "let's postpone the exam” –S: (v) table, tabularize, tabularise, tabulate (arrange or enter in tabular form)

12 Sentiment Analysis Using only a thesaurus, find a path between two words –no antonyms –no colloquialisms or slang

13 Sentiment Analysis For example, how would you get from delightful to rainy?

14 SEASR: Sentiment Analysis How to get from delightful to rainy ? ['delightful', 'fair', 'balmy', 'moist', 'rainy’] sexy to joyless? ['sexy', 'provocative', 'blue', 'joyless’] bitter to lovable? ['bitter', 'acerbic', 'tangy', 'sweet', 'lovable’]

15 SEASR: Sentiment Analysis Use this game as a metric for comparing a given adjective to one of the six emotions. Assume the longer the path, the “farther away” the two words are.

16 SEASR: Sentiment Analysis Introducing SynNet: a traversable graph of synonyms (adjectives)

17 Thesaurus Network (SynNet) Used thesaurus.com, create link between every term and its synonyms Created a large network Determine a metric to use to assign the adjectives to one of our selected terms –Is there a path? –How to evaluate best paths?

18 SynNet: rainy to pleasant

19 SynNet Metrics Path length Number of Paths Common nodes Symmetric: a  b b  a Unique nodes in all paths

20 SynNet Metrics: Path Length Rainy to Pleasant –Shortest path length is 4 (blue) Rainy, Moist, Watery, Bland, Pleasant –Green path has length of 3 but is not reachable via symmetry –Blue nodes are nodes 2 hops away

21 SynNet Metrics: Common Nodes Common Nodes –depth of common nodes Example –Top shows happy –Bottom shows delightful –Common nodes shown in center cluster

22 SynNet Metrics: Symmetry Symmetry of path in common nodes

23 SynNet: Sentiment Analysis Step 1: list your sentiments/concepts –joy, sad, anger, surprise, love, fear Step 2: for each concept, list adjectives –joy: joyful, happy, hopeful –surprise:surprising,amazing, wonderful, unbelievable Step 3: for each adjective in the text, calculate all the paths to each adjective in step 2 Step 4: pick the best adjective (using metrics)

24 SynNet: Sentiment Analysis Example: –the adjective incredible is more like which emotion

25 SynNet: Sentiment Analysis Incredible to loving (concept: love) Blue paths are symmetric paths

26 SynNet: Sentiment Analysis Incredible to surprising (concept: surprise) Blue paths are symmetric paths

27 SynNet: Sentiment Analysis Incredible to joyful (concept: joy)

28 SynNet: Sentiment Analysis Incredible to joyless (concept: sad)

29 SynNet: Sentiment Analysis Incredible to fearful (concept: fear)

30 SynNet: Sentiment Analysis Incredible to wonderful (concept: joy)

31 SynNet: Sentiment Analysis Try it yourself: http://services.seasr.org/synnet – /synnet/path/white/afraid – /synnet/path/white/afraid?format=xml – /synnet/path/white/afraid?format=json – /synnet/path/white/afraid?format=flash –Database is only adjectives –More api coming soon, visualizations

32 Sentiment Analysis: Issues Not a perfect solution –still need context to get quality Vain –['vain', 'insignificant', 'contemptible', 'hateful'] –['vain', 'misleading', 'puzzling', 'surprising’] Animal –['animal', 'sensual', 'pleasing', 'joyful'] –['animal', 'bestial', 'vile', 'hateful'] –['animal', 'gross', 'shocking', 'fearful'] –['animal', 'gross', 'grievous', 'sorrowful'] Negation –“My mother was not a hateful person.”

33 Sentiment Analysis: Process Process Overview (2 flows) –Create Concept Cache & Ignore Cache Load the documents Extract the adjectives (POS analysis) Find the unique adjectives Label each adjective (SynNet Service) –Apply Concepts Load the document(s) Segment the document for single document Extract the adjectives (POS analysis) Summarize adjectives across segments or documents Visualize the concepts by segments

34 Sentiment Analysis: Visualization SEASR visualization component –Based on flash using the flare ActionScript Library http://flare.prefuse.org/ –http://demo.seasr.org:1714/public/resources/data/viewe r/emotions.html

35 Sentiment Analysis: 911 Corpus Concepts for each story were identified as before Mapping was done by using additional meta- data for each story

36 Concept Mapping of an Author 5 books Charles Dickens 1.Tale of Two Cities 2.Great Expectations 3.Christmas Carol 4.Oliver Twist 5.David Copperfield

37 Concept Mapping for Multi Documents

38 Concept Mapping of a Single Document Tale of Two CitiesGreat Expectations

39 Concept Mapping of a Single Document

40 Concept Mapping: Creating Cache Files Two cache files –Concept cache Stores the word, concept, POS, seed word mapping and some numbers –greatjoyJJ031wonderful2 –anonymoussurpriseJJ3561unbelievable4 –darkfearJJ81502horrible2 –Ignore cache Stores the word that do not map to a concept

41 Concept Mapping: Create Cache Flow

42 Concept Mapping Notes If list of concepts and seed words have not changed, you can continue to use the same cache files for all documents. But you will need to change the cache file it you want to define new concept mappings. –E.g. Emotion Tracking: 6 concepts and their seed words –E.g. Positive/Negative: 2 concepts and seeds like (yes, yeah, ok, etc) (no, nay, not, etc) –E.g. Male/Female: 2 concepts and seeds like (he, his, him, mr, etc.) (she, her, mrs, etc.) Copy cache files to your machine for starters

43 Topic Modeling Uses Mallet Topic Modeling to cluster nouns from over 4000 documents from 19 th century with 10 segments per document Top 10 topics showing at most 200 keywords for that topic

44 Topic Modeling Process Load the documents Segment the documents Extract nouns (POS analysis) Create the Mallet data structures for each segment Mallet for topic modeling Save results Parse keyword results Create tagclouds of keywords

45 Demonstration Entity Extraction for timelines, maps, and social networks Concept Tracking –Emotion Tracking for single document –Emotion Tracking comparison for multiple documents Topic Modeling –Tagclouds of topic keywords

46 Learning Exercises Construct flow for performing entity extraction and review results. –Determine what you want to do with these results. Open the flow for tracking concepts –Modify the flow to load your data –Modify the flow to track concepts of interest to you

47 Attendee Project Plan Study/Project Title Team Members and their Affiliation Procedural Outline of Study/Project –Research Question/Purpose of Study –Data Sources –Analysis Tools Activity Timeline or Milestones Report or Project Outcome(s) Ideas on what your team needs from SEASR staff to help you achieve your goal. Identify Analytics

48 Discussion Questions What part of these applications can be useful to your research?


Download ppt "More Text Analytics National Center for Supercomputing Applications University of Illinois at Urbana-Champaign."

Similar presentations


Ads by Google