Surveys often use either open-ended or closed-ended questions, depending on whether they want to collect more data or make the data easier to analyze. A common problem is that people are not interested in doing surveys that seem long and time-consuming. This computational essay aims to find a solution to this problem. It analyzes how popular literature can be used to create more favorable sets of survey questions. In this essay we specifically use famous poems.
The Literature
The Literature
In this essay, we use three popular poems: “Shall I Compare Thee to a Summer’s Day?” by William Shakespeare, “The Road Not Taken” by Robert Frost, and “O Captain! My Captain!” by Walt Whitman. The reason for using these poems is to select literature that is already popular and does not require an argument on the factors that make a poem appealing.
In[]:=
summersDay={"Shall I compare thee to a summer’s day?","Thou art more lovely and more temperate.","Rough winds do shake the darling buds of May,","And summer’s lease hath all too short a date.","Sometime too hot the eye of heaven shines,","And often is his gold complexion dimmed;","And every fair from fair sometime declines,","By chance, or nature’s changing course, untrimmed;","But thy eternal summer shall not fade,","Nor lose possession of that fair thou ow’st,","Nor shall death brag thou wand'rest in his shade,","When in eternal lines to Time thou grow'st.","So long as men can breathe, or eyes can see,","So long lives this, and this gives life to thee."};twoRoads={"Two roads diverged in a yellow wood,","And sorry I could not travel both","And be one traveler, long I stood","And looked down one as far as I could","To where it bent in the undergrowth;","","Then took the other, as just as fair,","And having perhaps the better claim,","Because it was grassy and wanted wear;","Though as for that the passing there","Had worn them really about the same,","","And both that morning equally lay","In leaves no step had trodden black.","Oh, I kept the first for another day!","Yet knowing how way leads on to way,","I doubted if I should ever come back.","","I shall be telling this with a sigh","Somewhere ages and ages hence:","Two roads diverged in a wood, and I—","I took the one less traveled by,","And that has made all the difference."};oCapMyCaptain={"O Captain! my Captain! our fearful trip is done,","The ship has weather’d every rack, the prize we sought is won,","The port is near, the bells I hear, the people all exulting,","While follow eyes the steady keel, the vessel grim and daring;","But O heart! heart! heart!","O the bleeding drops of red,","Where on the deck my Captain lies,","Fallen cold and dead.","","O Captain! my Captain! rise up and hear the bells;","Rise up—for you the flag is flung—for you the bugle trills,","For you bouquets and ribbon’d wreaths—for you the shores a-crowding,","For you they call, the swaying mass, their eager faces turning;","Here Captain! dear father!","This arm beneath your head!","It is some dream that on the deck,","You’ve fallen cold and dead.","","My Captain does not answer, his lips are pale and still,","My father does not feel my arm, he has no pulse nor will,","The ship is anchor’d safe and sound, its voyage closed and done,","From fearful trip the victor ship comes in with object won;","Exult O shores, and ring O bells!","But I with mournful tread,","Walk the deck my Captain lies,","Fallen cold and dead."};
Sentiment Analysis
Sentiment Analysis
In this section, our goal is to analyze the sentiment of each sentence using the Classify function in Mathematica and visualize how it changes graphically. We assign statements with a positive sentiment a value of 1, statements with a negative sentiment a value of -1, and neutral statements a value of 0.
Assigning Sentiment using Classify
Assigning Sentiment using Classify
In[]:=
summerDaySen=Classify["Sentiment",summersDay]twoRoadsSen=Classify["Sentiment",twoRoads]oCapMyCaptainSen=Classify["Sentiment",oCapMyCaptain]
Out[]=
{Neutral,Positive,Negative,Positive,Positive,Negative,Positive,Positive,Neutral,Positive,Neutral,Neutral,Positive,Positive}
Out[]=
{Neutral,Negative,Neutral,Negative,Negative,Positive,Indeterminate,Negative,Negative,Positive,Negative,Positive,Neutral,Negative,Positive,Positive,Negative,Positive,Positive,Negative,Neutral,Negative,Negative}
Out[]=
{Positive,Positive,Positive,Positive,Positive,Positive,Negative,Negative,Positive,Positive,Neutral,Negative,Positive,Positive,Positive,Positive,Negative,Positive,Neutral,Negative,Neutral,Neutral,Positive,Negative,Neutral,Negative}
Reinterpreting Strings as Numbers to Graph Data
Reinterpreting Strings as Numbers to Graph Data
In[]:=
summerDaySenNumEx=summerDaySen/.{"Positive"->1,"Negative"->-1,"Neutral"->0}twoRoadsSenNumEx=twoRoadsSen/.{"Positive"->1,"Negative"->-1,"Neutral"->0}oCapMyCaptainSenNumEx=oCapMyCaptainSen/.{"Positive"->1,"Negative"->-1,"Neutral"->0}
Out[]=
{0,1,-1,1,1,-1,1,1,0,1,0,0,1,1}
Out[]=
{0,-1,0,-1,-1,1,Indeterminate,-1,-1,1,-1,1,0,-1,1,1,-1,1,1,-1,0,-1,-1}
Out[]=
{1,1,1,1,1,1,-1,-1,1,1,0,-1,1,1,1,1,-1,1,0,-1,0,0,1,-1,0,-1}
Removing Indeterminate Values
Removing Indeterminate Values
In[]:=
twoRoadsSenNumExRef=Delete[twoRoadsSenNumEx,7]
Out[]=
{0,-1,0,-1,-1,1,-1,-1,1,-1,1,0,-1,1,1,-1,1,1,-1,0,-1,-1}
Graphing the literature
Graphing the literature
In[]:=
ListPlot[summerDaySenNumEx]ListPlot[twoRoadsSenNumExRef]ListPlot[oCapMyCaptainSenNumEx]
Out[]=
Out[]=
Out[]=
Using Interpolation to Create Smooth Curves for Graphs
Using Interpolation to Create Smooth Curves for Graphs
In[]:=
f=Interpolation[summerDaySenNumEx]Plot[f[x],{x,1,100}]
Out[]=
InterpolatingFunction
Out[]=
In[]:=
g=Interpolation[twoRoadsSenNumExRef]Plot[g[x],{x,1,100}]
Out[]=
InterpolatingFunction
Out[]=
These graphs indicate that the functions are either of the form ax^2 or -ax^2. This implies that the overall change in emotion is either persistently positive or persistently negative, and it cannot be ambiguous. Based on this finding, we can further investigate this literature. We can also determine the rate of change of emotion to understand how the survey should progress with questions based on the derivative of emotion.
Predicting the Sentiment using Machine Learning
Predicting the Sentiment using Machine Learning
Although the findings from the interpolation and machine learning methods differ, they still demonstrate that the emotion value approaches either 1 or -1, indicating a clear tendency toward either positivity or negativity.
Analyzing Sentence-Sentence Similarity in Literature
Analyzing Sentence-Sentence Similarity in Literature
By analyzing the similarity between sentences, we aim to understand how subsequent survey questions can be constructed in terms of similarity to achieve the highest response rate
Sentence-Sentence Similarity using SmithWatermanSimilarity
Sentence-Sentence Similarity using SmithWatermanSimilarity
Sentence-Sentence Similarity using Normalized SmithWatermanSimilarity
Sentence-Sentence Similarity using Normalized SmithWatermanSimilarity
Plotting the Similarities
Plotting the Similarities
Based on the trends presented in the graphs, it can be observed that there is a positive correlation between the value of SmithWatermanSimilarity and the value of line pairs. Specifically, as the value of line pairs increases, the value of SmithWatermanSimilarity also increases. For instance, the SmithWatermanSimilarity of lines 1 and 2 is lower than that of lines 3 and 4. Based on the information provided, it can be inferred that the observed similarity trends may have a positive impact when applied in survey contexts.
Analyzing Rhythms in the Literature
Analyzing Rhythms in the Literature
Function to check for Rhythms between sentences
Function to check for Rhythms between sentences
Truth Values between Sentences
Truth Values between Sentences
Word Count Trends
Word Count Trends
No correlation seems to exist between the word index and the number of characters in the word.
Cross Language Analysis
Cross Language Analysis
The objective of this study is to analyze the linguistic features of different poems in various languages without prior knowledge of the languages. By comparing the similarities and differences in the probabilities of certain linguistic patterns, the study aims to explore whether the poetic effect of a poem varies across languages. The hypothesis is that if two languages have similar probabilities of certain linguistic features in their poems, then the same poem translated into those languages would have similar impacts on the readers. By comparing the responses of survey participants from different linguistic backgrounds, the study will assess the validity and reliability of the survey instruments across languages and cultures.
By combining these probabilities, we obtain the resulting association. However, it is important to note that these probabilities may not be entirely accurate as they are based on a limited sample of only three poems. To gain a better understanding of the probabilities associated with the English language, it would be beneficial to gather more literature for analysis. This would also allow for a comparison between different languages.
Limitations
Limitations
◼
The selection of predictors in the sentiment analysis section demonstrates that the machine learning and interpolation methods yielded disparate outcomes. This suggests that further investigation is necessary to determine the cause of the discrepancy and to ascertain which method is more suitable.
◼
The insufficiency of data, specifically the availability of only three poems, may not provide an adequate basis for drawing accurate conclusions.
◼
The utilization of modeling techniques such as regression without the incorporation of a metric to assess the magnitude of error may result in the inappropriate application of the technique.
◼
The selection of poems deemed “popular” without a quantitative measure to determine their popularity may result in subjective conclusions.
Conclusion
Conclusion
We may infer that popular literature could offer more insights into the preferences of readers when they peruse sequential lines of text. The analysis of this text could facilitate the generation of more detailed survey results. Survey questionnaires that incorporate quantitative questions might be easier to process as data, but with the advancement of natural language processing techniques, it would become more feasible to process large amounts of survey information more rapidly.
CITE THIS NOTEBOOK
CITE THIS NOTEBOOK
Enhancing Survey Response Rates through the Utilization of Popular Literature
by Muhammad Ali Hafeez
Wolfram Community, STAFF PICKS, August 25, 2023
https://community.wolfram.com/groups/-/m/t/2998676
by Muhammad Ali Hafeez
Wolfram Community, STAFF PICKS, August 25, 2023
https://community.wolfram.com/groups/-/m/t/2998676