Using Computation and Analysis for Business Insights
6
|
Tone for the Text in a Business Proposal
Introduction
When creating a business proposal or a pitch to potential investors, using the proper tone in the text is important. Can we use computation to check the sentiment of text to make sure it conveys a positive tone?

Predicted Sentiment of Text

Classify can be used to make several types of predictions using built-in deep learning. Classify can predict the age of humans based on a picture or predict the sentiment of text, like the following calculation:
In[]:=
Classify["Sentiment","optimist"]
Out[]=
Positive
The same Wolfram Language command will accept phrases instead of words and will predict the sentiment of the overall phrase. The possible predictions are Positive, Negative or Neutral. Classify will even accept a list of phrases and will return the corresponding predictions in a list:
In[]:=
Classify["Sentiment",{"We saw growth","It was a good achievement","That ended up decreasing","We were disappointed"}]
Out[]=
{Neutral,Positive,Negative,Negative}
When analyzing a lengthy proposal, it might be useful to analyze each sentence separately. The following calculation mirrors typical formatting when importing a block of text from a website or external document:
In[]:=
proposal="Our company Balloonist expects growth in the first quarter based on our projections. The young and energetic CEO finds that a good achievement. Initially, the corporate offices will be in Lakeland, Florida since that is a large city with low housing prices.";
To analyze each sentence separately, StringSplit creates a list of data, with each value in the list being a sentence. StringSplit splits the block of text at each period:
In[]:=
StringSplit[proposal,"."]
Out[]=
{Our company Balloonist expects growth in the first quarter based on our projections, The young and energetic CEO finds that a good achievement, Initially, the corporate offices will be in Lakeland, Florida since that is a large city with low housing prices}
That list can then be used with Classify to predict the sentiment for each sentence:
In[]:=
sentiment=Classify["Sentiment",StringSplit[proposal,"."]]
Out[]=
{Neutral,Positive,Positive}
This example only contains three sentences, so the result above provides a nice summary. But for lengthier proposals, Tally can be used to summarize the results. The following calculation tells us there are two sentences with Positive sentiment and one sentence with Neutral sentiment:
In[]:=
TextGrid[Tally[sentiment]]
Out[]=
Neutral
1
Positive
2

Summary

Once you understand the overall conventions of Wolfram Language commands and how to work with lists, the thousands of built-in commands can act as a nice set of building blocks for creative data analytics.
DownloadNotebook»