Method, system and computer program product for sentiment analysis
Methods, systems, and computer program product for automatically performing sentiment analysis on texts, such as telephone call transcripts and electronic written communications. Disclosed techniques include, inter alia, lexicon training, handling of negations and shifters, pruning of lexicons, confidence calculation for token orientation, supervised customization, lexicon mixing, and adaptive segmentation.
1. A method comprising:
receiving a text corpus comprising a plurality of n-gram tokens; and
automatically segmenting said text corpus into a plurality of segments based, at least in part, on sentiment orientation, by:
(i) identifying one or more anchor tokens in said text corpus, wherein each of said anchor tokens has a sentiment orientation,
(ii) searching for an expansion of each of said anchor tokens, wherein a boundary of said expansion is determined based on an orientation metric of said expansion meeting a specified threshold, and
(iii) setting said expansion as one of said segments.
2. The method of claim 1 , wherein said anchor token is identified based, at least in part, on an orientation score associated with said anchor token.
3. The method of claim 1 , wherein said boundary is detected based, at least in part, on a gradient magnitude of a change in said orientation metric meeting a specified threshold.
4. The method of claim 1 , further comprising iteratively repeating steps (ii) and (iii) with respect to said segment.
5. A system comprising:
a processor; and
a memory in communication with the processor, the memory storing instructions that, when executed by the processor causes the processor to:
receive a text corpus comprising a plurality of n-gram tokens; and
automatically segment said text corpus into a plurality of segments based, at least in part, on sentiment orientation, by:
(i) identifying one or more anchor tokens in said text corpus, wherein each of said anchor tokens has a sentiment orientation,
(ii) searching for an expansion of each of said anchor tokens, wherein a boundary of said expansion is determined based on an orientation metric of said expansion meeting a specified threshold, and
(iii) setting said expansion as one of said segments.
6. The system of claim 5 , wherein said anchor token is identified based, at least in part, on an orientation score associated with said anchor token.
7. The system of claim 5 , wherein said boundary is detected based, at least in part, on a gradient magnitude of a change in said orientation metric meeting a specified threshold.
8. The system of claim 5 , further comprising iteratively repeating steps (ii) and (iii) with respect to said segment.