A Tale of Two Futures
Comparing Philosophical Texts of Communist vs. Capitalist Philosophers
Throughout history, two dominant systems have been at the forefront of philosophical discussions: Capitalism and Communism. These systems have been shaped by the ideas of influential authors, each offering their own unique perspectives on how society should be structured and how wealth should be distributed.
My first project is an exploratory data analysis to investigate and compare Capitalist and Communist texts in the hopes of revealing trends that are indicative of their ideological attributes.
Let’s get into it!
Introduction
I will be using a dataset compiled for the 'Philosophy Data Project'. The corpus includes 30 texts from over 50 authors that span across ideology and time-period. My project aims to evaluate these schools across four criteria:
Text Characteristics - What is the average sentence length?
Sentence Structure - What is weighted average usage of nouns, adjectives, and verbs?
Sentence Polarity - What is the polarity breakdown of sentences?
Emotional Connotations - What are the weighted average usage of emotionally affected words?
With the above criteria, I intend to deduce whether my findings naturally align with accepted tenets of these schools.
Code
I conducted this project in Python, using a variety of visualization and natural language processing libraries, to analyze and plot my findings. If you’re interested in the underlying code, check out the Jupyter Notebook on my Github!
I’m always open to comments, questions, or suggestions on my methodology (I’m definitely still learning the tricks of the trade). Please feel free to reach out to me at nanfographics@gmail.com.
Criteria 1: Text Characteristics
For my analysis, I am operating under the assumption that shorter sentences are a common feature of persuasive, impactful writing. With this in mind, I evaluated the spread and centers of the sentence length of texts in each school:
From the above, we can clearly see that the mean and median sentence lengths of Capitalist authors are larger than their Communist counterparts. Beyond that, the sentence lengths in Capitalist authors spans a greater range, with a larger proportion falling in the upper quartile of the dataset.
The findings of our first graph show that Capitalist authors favor writing longer sentences. However, let’s take a look at the sentence lengths broken out by author to see if any more details are revealed…

From the above, we can see that the mean sentence length of Capitalist authors, though higher as a whole, does not vary much from author to author. Conversely, there is higher difference of average sentence length between Communist authors. Marx uses the shortest sentences of all the authors in our dataset.
With my assumption in mind, I can infer that Communist writers tend to write shorter, more impactful sentences than Capitalists. While these text graphs give us a cursory view of the school/author writing style, we can now go one step further and evaluate the types of words being used in the texts.
Criteria 2: Sentence Structure
In this section, I’m going to break down the types of speech found in the sentences of each author. For this analysis, I will be using the NLTK Python package to categorize the words in each sentence. While the package offers a variety of speech tags, I will be focused on identifying the following:
Nouns - To what extent is the author's text discussing people, ideas, concepts?
Adjectives - To what extent does the author's text rely on descriptive imagery?
Verbs - To what extent is the author's text action-oriented?
Given that the text sizes vary across authors, I weighted the count of speech tags to arrive at a meaningful comparison. Assuming that each sentence conveys a complete thought, I believe it is best to weight speech tags in a sentence by the total number of words in that sentence and then sum up the values. Thus, I can measure each sentence's reliance on nouns, verbs, and adjectives to convey its thought.

Some preliminary observations…
Nouns - It looks like all authors are using more nouns than either adjectives or verbs. However, both Communist writers, Marx and Lenin, have higher noun scores that their Capitalist counterparts. One could infer that these texts are more focused on people, places, and ideals.
Adjectives - There doesn't seem to be a trend across schools for use of adjectives. We see that the highest usage of adjectives is Smith, followed by Lenin. This suggests that these two authors are most reliant on descriptive imagery
Verbs - There isn't a clear trend of adjective usage across schools. We see that Ricardo and Keynes, both Capitalist authors, have the first and second highest usage of verbs. While Smith does not seem to use verbs as much, he is still higher than Marx, his communist contemporary. This could indicate that Capitalist texts tend to be more action-oriented.
I compared average scores across schools to see if the above observations still held true:
And they do! Communist writers seem to have texts that are more focused on people, places, and concepts (nouns). Capitalist writers seem to produce texts that are more action-oriented (verbs). There is a marginal difference in the use of adjectives across both schools, suggesting that they equally rely on descriptive imagery to tell their stories.
Criteria 3: Sentence Polarity
In this section, we will explore the polarity scores of sentences in the texts of each author. Polarity refers to the overall sentiment conveyed by a particular text, phrase or word. I will be using the NLTK VADER package for my analysis. VADER produces four sentiment measurements. The initial three - positive, neutral, and negative - address any content that falls into pre-defined classifications. The last measurement, the compound score, is the total amount of the lexicon grades which have been normalized to run between – 1 and 1.

From the graph and statistics above, we can deduce that the Communist texts are comprised of sentences that are more neutral than Capitalist texts. It appears that Capitalist texts tend to convey more positive sentiments and conversely, Communist texts are slightly more negative. This aligns with my understanding of Capitalism as a quixotic ideology, where as Communism (which was born out of a critique to Capitalism) paints a more pessimistic future. That being said, the compound scores of both schools are in the 'positive' range. Perhaps this is because our authors are writing with the intent of convincing? You can’t make someone believe your view is the best without conveying a largely positive message.
Criteria 4: Emotional Connotation
If you made it this far, well done! In this last section, I will evaluate each author and their schools on the emotions evoked by their texts. I will be focused on the 6 universal emotions as validated by Paul Ekman in his 1970 study, ‘Universal Facial Expressions of Emotions’ : Fear, Joy, Sadness, Disgust, Anger, and Surprise (or more commonly recognized known as the characters from ‘Inside Out’):
For this analysis, I will use MIT's NCRLex package to measure the emotional affect of the texts.
From the above, we can see that Keynes and Smith, both Capitalists, seem to evoke 'Joy' as their primary emotion. This aligns with the findings from our previous section, where we saw that Capitalist writers' sentences received higher positive sentiment scores on average. Conversely, both of our Communist philosophers, Lenin and Marx seem to primarily evoke 'Fear'. Ricardo seems to rely most on 'Sadness' to communicate his message, though the numbers show that his secondary emotion is indeed 'Joy'.
We can see that the greatest difference between the two schools lies in their usage of words that evoke Joy and Sadness. While we know that Fear was a common trait for both Communist philosophers, there isn't much difference in the usage of Fear across Capitalism and Communism, suggesting that both schools of thought utilize Fear as a driver of their messaging.
On a whole, it looks as though Capitalist philosophers paint a more idyllic picture of the world while still relying on Fear to supplement their philosophies. Communist philosophers seem to use more Fear and Anger to convince their readers, yet are still utilizing Joy as a secondary or tertiary emotion.
Conclusion
The purpose of this exploratory data analysis was to compare Capitalist and Communist philosophers across 4 criteria. Through this analysis, we found that:
Text Characteristics - Capitalist authors were writing longer sentences than their Communist counterparts. The Communist authors’ preference for shorter sentences could be indicative of a more curt or impactful writing style.
Sentence Structure - Both schools relied heavily on nouns to convey their ideals and there was little difference in their usage of adjectives. However, Capitalist authors tend to use more verbs suggesting that their writing is more action-oriented than their Communist counterparts.
Sentence Polarity - Communist authors’ sentences were generally more neutral than Capitalist authors. Capitalist sentences appeared to score higher for positive sentiment, suggesting these authors often convey philosophies that are more hopeful or optimistic.
Emotional Connotation - The primary emotion of 2/3 Capitalist philosophers where as both Communist philosophers relied on Fear. Secondary emotions reveal that most authors tend to use a blend of Joy + Fear or Sadness + Joy. This perhaps suggests that authors across both schools use a blend of positive and negative emotions; perhaps using the latter to provide a promise of a world view and the former to paint a picture of the alternative.
Whether you like what you read or hated it, I want to know!
def reach_out_with():
print('Topic Ideas')
print('Improvements')
print('Questions')
print('or just to say Hi :)')
return 'Email me at nanfographics@gmail.com'




