spatrick, Shane Patrick
Any comments that you would like to make about the lab,
including troubles you had, things that were interesting,
and ways we could make it better.
Part 1: Google Ngram Viewer
Here is a graph of the most popular "freedoms" discussed in English literature since 1800.
Here is a graph of the most popular "liberties" in English literature since 1800
Here is a graph of the most popular freedoms and liberties together in American writing since 1750.
It's interesting to see how steeply "liberty" has declined and how it has been replaced by "freedom".
Here is a graph of the use of "rebel" as a noun vs as a verb.
Note the spikes during the American Revolution and the American Civil war.
Here is a graph of the use of "murder" over time in fiction.
I used the Ngram viewer to plot a few graphs. First, I looked at the most discussed freedoms and liberties over time by using the wildcard search functions freedom of * and liberty of * . I found a few interesting things. After discarding the results for "the", we could see that freedom of expression, freedom of movement, and freedom of religion loom much larger in the 21st century mind than in the 1800s. On the other hand, we have seen a downtick in interest in freedom of thought, freedom of conscience, and freedom of trade. Interest in freedom of speech has remained comparatively high over time but has grown in recent years. On the "liberty" side, we can see that, overall, the use of "liberty" has declined compared to the use of "freedom". In addition, the most popular "liberty", liberty of conscience, has seen a steep decline in interest similar to freedom of conscience.
I also plotted the use of "rebel" over time as a noun and a verb. It is much more common as a noun, and we can see a little spike during the time of the American Revolution and a huge spike during the American Civil War. I also plotted a graph which shows How much the word "murder" was used compared to its overall use. The higher the fiction usage is, the more we can presume that production of murder mysteries and similar works of fiction outpaced the actual rate of violent crime in that society.
Part 2: Voyant
I analyzed the text of John Stuart Mill's book of political theory "On Liberty". This book has been very influential in forming the American concept of free speech over time. In the word cloud, you can see a lot of words which relate to political philosophy, and especially to the philosophy of free speech and governance. I also liked the bubble lines feature, which gave me a visual representation of how frequently Mill used different terms throughout the book. It is interesting to see what terms etc he focuses on more intensely in different sections. Other tools that I found particularly useful and helpful were the correlations tool and the "phrases" tool. I liked how you could sort the phrases in different ways and limit them by size and frequency. It was really interesting to see what sequences of words Mill was a big fan of using together.
Part 3
One word which Sentimood uniformly calls negative but can be positive or negative depending on context is "die". For example, the sentences "I am going to die." and "The die showed double sixes" both received -3 scores on account of the word die. Another pair of exampls are the words "mean" and "high", which are both neutral, but can have different sentiments in different contexts. Take the sentences "The mean score of the class was very high" (a very positive sentence) and "John is a very mean person when he is high" (a very negative sentence); they are both scored as only containing neutral words by sentimood.
"Good" is given a 3 positive score, while better is given a 2 positive score.
I analyzed sections of the past two State of the Union addresses, President Trump's in 2020 and President Biden's in 2021, for their sentiments.
Here are six passages. Two of them are in agreement and correct. Two of them have different assessments. Two of them are in agreement and are clearly wrong.
Both in agreement, both right (computer says they are positive):
"America is the place where anything can happen. America is the place where anyone can rise. And here, on this land, on this soil, on this continent, the most incredible dreams come true." -Trump, 2020
"Parents seeing the smiles on their kids' faces, for those who are able to go back to school because the teachers and school bus drivers and cafeteria workers have been vaccinated." - Biden, 2021
Disagree: In the first one, sentimood says it is solidly negative while demo says it is solidly neutral. In the second case, sentimood says it is solidly positive while the demo says it's solidly neutral. Here they are:
"Our ancestors braved the unknown; tamed the wilderness; settled the Wild West; lifted millions from poverty, disease, and hunger; vanquished tyranny and fascism; ushered the world to new heights of science and medicine; laid down the railroads, dug out the canals, raised up the skyscrapers." -Trump, 2020
"But the rest of the world is not waiting for us. I just want to be clear: From my perspective, doing nothing is not an option. Look, we can't be so busy competing with one another that we forget the competition that we have with the rest of the world to win the 21st century." -Biden, 2021
Here are two statements where the computer says they are both negative, but both are positive:
"the average unemployment rate under my administration is lower than any administration in the history of our country" -Trump 2020
"A dose of hope for an educator in Florida who has a child suffering from an autoimmune disease—wrote to me, said she's worried—that she was worrying about bringing the virus home. She said she then got vaccinated at a large site, in her car. She said she sat in her car, when she got vaccinated and just cried, cried out of joy and cried out of relief." -Biden 2021
Part 4: Machine Translation
I used Google Translate and Bing Translate. My main languages are Latin (not supported on Bing translate), Ancient Greek (supported on neither), and Arabic (supported on both). I did some English-Latin translation, some English-Arabic translation, and some English-Latin-Arabic translation. Deepl supported none of my languages. Honestly, I'm a bit skeptical of online translation service and reverse translation back and for without mediation through a third language. I noticed that all the texts, not just the ones included here, got significantly more distorted when I ran them through a third language, which leads me to guess that maybe there's some kind of computer memory to undo what it just did, or maybe a heavy bias towards English translation, or maybe the computer is just not very experienced at Arabic-Latin translation, or some combination of those. Anyhow, here are my samples:
Ones that worked well:
I ran this passage from the Gospel of Luke 3: 21-22 through Arabic and back into English on Bing translate. The original was:
Now when all the people were baptized, and when Jesus also had been baptized and was praying, the heaven was opened, and the Holy Spirit descended upon him in bodily form, as a dove, and a voice came from heaven, “Thou art my beloved Son; with thee I am well pleased."
This became:
Now when all people were baptized, and when Jesus was also baptized and prayed, the sky opened, and the Holy Spirit descended on him in physical form, as a dove, and a voice came from heaven, "You are my beloved son's art. With you, I'm so glad."
Obviously it got a bit mangled at the end, but on the whole an accurate translation.
I ran this passage from Luke 11:11-13 through Latin and back into English on Google Translate. The original was:
What father among you, if his son asks for a fish, will instead of a fish give him a serpent; or if he asks for an egg, will give him a scorpion? If you then, who are evil, know how to give good gifts to your children, how much more will the heavenly Father give the Holy Spirit to those who ask him!
This became:
Which of you the father, if the son asks for a fish, will give the serpent instead of the fish; or if he shall ask for an egg, will he give a scorpion? If, then, you, you evil people, know how to give good gifts to your children, how much more will the heavenly Father give the Holy Spirit to those who ask him?
Again, this had some quick kerfuffles at the beginning but on the whole was a super solid translation, almost nothing was lost.
Google translate did a bit worse when I ran text through Latin and Arabic and then back into English. I tried this section of Longfellow's Midnight Ride of Paul Revere. Here's the original:
He said to his friend, “If the British march
By land or sea from the town to-night,
Hang a lantern aloft in the belfry arch
Of the North Church tower as a signal light,"
This became:
He said to his friend: "If the Britons walk
by land and sea by night;
Hang a high lantern in the arch of the bell tower
The north tower is like a traffic light"
Obviously this got a lot worse. You can see the bones of the original in the translation, but even in this rather simple text, the only clause that the computer was able to preserve and transmit properly was the unbelievably simple "He said to his friend"
Here's another. I switched the order on this one, running the text first through Arabic and then through Latin. I used a section of the list of abuses and usurpations in the Declaration of Independence. Here's the original:
He has erected a multitude of New Offices, and sent hither swarms of Officers to harrass our people, and eat out their substance.
He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.
This became:
He set up a good number of new offices, and sent examining officers here to harass our men, and their property to be devoured.
Keep us in peace, the army stands without the consent of our laws.
Again, you can see that the text underwent some serious distortion. It's interesting to see what happened with "standing armies", and how that English expression was changed through translation and was itnerpreted as the literal act of standing. I did not see a major difference between the services. A lot of that is due to my strongest languages not being very well represented. Additionally, it's tough for me to answer the question of practicality. I have found google translate to be super helpful for Arabic as I'm more of an intermediate. For Ancient Greek the question is irrelevant. The reason most people learn Latin is not necessarily to use it in practical life, but rather to access ancient texts with more nuance than a translation and generally as an exercise of intellectual sharpening. Translation services on the internet are not helpful for either of those, as they are rather poor for Latin particularly, and they lack the nuance which is the precise reason for which many people learn Latin.
Part 5: Machine Learning
I did two machine learning projects. First, I entered a set of pictures with me wearing various hats and then with me bareheaded.
Here are two pictures of me with a hat:
and here's me with no hat
It was interesting when the computer was faced with images where the hat was not on my head or where something else was on my head. Here's one where I'm holding my hat next to me. The computer put it in the hats category.
And here's me with my arm on my head, also placed in the category with head coverings:
I also did some stuff with the sound feature. I recorded background noise, me reciting the beginning of the Declaration of Independence, and me singing Rocky Top. After placing these in three classes in the machine learning program, I then was silent, talked, and sang. The machine did a pretty good job of recognizing which was which:
I tried the machine originally with about 20 training examples for the photos, which were insufficient. My next step was to over 100, which was a sufficient number. At that point, and the same thing with my first go at the sound example, there was really no better that the program could do. It was already identifying at nearly a 100% rate. Often background noise in my dorm made the sound difficult but otherwise it was spot on.
Part 6--- No Part 6