{"id":2967,"date":"2016-09-29T13:56:01","date_gmt":"2016-09-29T13:56:01","guid":{"rendered":"http:\/\/steamtrainsandghosts.com\/?page_id=2967"},"modified":"2023-07-01T08:35:03","modified_gmt":"2023-07-01T14:35:03","slug":"the-layers-of-english","status":"publish","type":"page","link":"https:\/\/steamtrainsandghosts.com\/?page_id=2967","title":{"rendered":"Etymology Marker"},"content":{"rendered":"<body><p><\/p><img decoding=\"async\" class=\"alignright size-full wp-image-5906\" src=\"http:\/\/steamtrainsandghosts.com\/wp-content\/uploads\/2023\/07\/screen-shot-2016-06-18-at-1-53-38-pm.png\" alt=\"An example of the etymology marker\" width=\"433\" height=\"521\" loading=\"lazy\" srcset=\"https:\/\/steamtrainsandghosts.com\/wp-content\/uploads\/2023\/07\/screen-shot-2016-06-18-at-1-53-38-pm.png 433w, https:\/\/steamtrainsandghosts.com\/wp-content\/uploads\/2023\/07\/screen-shot-2016-06-18-at-1-53-38-pm-249x300.png 249w\" sizes=\"auto, (max-width: 433px) 100vw, 433px\" \/>In 2016, I wrote a Python program that looks up the etymologies of words in a given text and color-codes them with HTML tags. I meant it as a tool to let writers easily visualize the register of their writing, \u00e1 la <a href=\"http:\/\/www.hemingwayapp.com\/\">The Hemingway App<\/a>. The text below is based off my original blog post, which explains the rationale and some technical aspects of the program.\n<p>You can get the Etymology Marker for yourself <a href=\"https:\/\/github.com\/four-d-tesseract\/EtymologyMarker\">on GitHub<\/a>.<\/p>\n<p>Here are some <a href=\"http:\/\/steamtrainsandghosts.com\/?page_id=2802\">examples of what the Etymology Marker can do<\/a>.<\/p>\n<p>And here\u2019s the original blog post:<\/p>\n<p>The English language is a wonderful mess. After centuries where England got invaded by Romans*, Angles, Saxons, Vikings, and Normans, and then the nineteenth century where the English turned around and colonized one quarter of Earth\u2019s landmass, the language has words from all over the world. English speakers seem to love picking up everybody else\u2019s words whenever we come into contact with them.<\/p>\n<p>English words come from three main sources. The oldest are the Germanic words from the Angles, Saxons, and the Vikings. The words that make up the nuts and bolts of the language like \u201cthe,\u201d \u201cof,\u201d \u201cand,\u201d and \u201cwith\u201d are Germanic. In 1066 Normans invaded and brought Old French with them, which evolved into words like \u201ccuisine,\u201d \u201cgallant,\u201d and \u201cherald.\u201d Meanwhile Latin and Greek were the languages of educated people throughout the Middle Ages and their words migrated into English in scientific and technical contexts. Words like these include \u201cphosphorylation\u201d and \u201cpoikilotherm.\u201d This migration is still happening today as scientists are in the habit of stringing Greek and Latin roots together to name new ideas.<\/p>\n<p>You, as a writer, can exploit the layers of English to control how your work sounds. You can dial up the register, towards Latin and Greek, to sound cool and cerebral. Or you can dial it back to the German end to sound gutsy and raw.<\/p>\n<p>I wrote a computer program that lets you visualize how this works. It color codes text based on word origins.<\/p>\n<p>All the texts I ran through the program are more than half Anglo-Saxon and Germanic. These words make up the core of the English language. Note how Dr. Seuss and Shakespeare run to the Germanic end, the political and scientific texts are more French, and the scientific paper is a whopping nine percent Greek and Latin words.<\/p>\n<p>You can use this tool to see where a writer makes a shift in register as well.<\/p>\n<p>I\u2019d eventually like to make this program into a Web app. In the meantime, <a href=\"http:\/\/steamtrainsandghosts.com\/?page_id=2891\">send me a text you like<\/a> and I\u2019ll analyze it.<\/p>\n<p>* A Redditor pointed out to me that the people living in the area at the time the Romans invaded spoke Celtic languages, which aren\u2019t closely related to English, so the Roman invasion wouldn\u2019t have had that much of an effect on English evolution.<\/p>\n<p>TECHNICAL STUFF<\/p>\n<p>This code is written in Python. I\u2019m new to programming, so I learned a lot while writing it \u2013 about dictionaries, variable scope, JSON, and regex.<\/p>\n<p>I used <a href=\"https:\/\/en.wikipedia.org\/wiki\/Lists_of_English_words_by_country_or_language_of_origin\">word lists on Wikipedia<\/a> to make an etymology dictionary. Then I wrote a script that reads in the text, looks it up in the dictionary, then adds HTML tags based on the word\u2019s etymology. It outputs an HTML file.<\/p>\n<p>I handled Greek words a bit differently, since there is no definitive list of English words with Greek roots. I made a list of Greek roots (<a href=\"https:\/\/en.wikipedia.org\/wiki\/List_of_Greek_and_Latin_roots_in_English\">again from Wikipedia<\/a>). If no other etymology can be found, the script searches for Greek roots within a word. This can lead to false positives. Furberg, a Norwegian last name, got marked Greek because it has the letters \u201cerg\u201d inside it.<\/p>\n<p>I checked the program on the <a href=\"http:\/\/splasho.com\/upgoer5\/\">Ten Hundred Most Used Words<\/a> that were inspired by Randall Munroe and reprinted by Theo Sanderson. I took the words that the program had missed and manually looked them up on the <a href=\"http:\/\/etymonline.com\/\">Online Etymology Dictionary<\/a>, then added them to my dictionary\u2019s vocabulary. I wanted even more vocabulary, so I ran the program again on the first five thousand of this list of the <a href=\"https:\/\/github.com\/first20hours\/google-10000-english\">twenty thousand most common words online<\/a>. Then I went back and manually added more words.<\/p>\n<p>I added Arabic etymology because \u201ccoffee\u201d showed up in the Ten Hundred Most Used Words list, and I like coffee.<\/p>\n<p>Text sources:<br>\n<a href=\"http:\/\/www.abrahamlincolnonline.org\/lincoln\/speeches\/gettysburg.htm\">The Gettysburg Address<\/a><br>\n<a href=\"http:\/\/www.monologuearchive.com\/s\/shakespeare_001.html\">Hamlet\u2019s Soliloquy<\/a><br>\n<a href=\"http:\/\/www.mfwi.edu\/MFWI\/Recordings\/HopOnPop.pdf\">Hop on Pop<\/a><br>\n<a href=\"http:\/\/www.un.org\/en\/universal-declaration-human-rights\/\">The United Nations Declaration of Human Rights<\/a><br>\n<a href=\"http:\/\/www.exploratorium.edu\/origins\/coldspring\/printit.html\">A Structure for Deoxyribose Nucleic Acid<\/a><\/p>\n<\/body>","protected":false},"excerpt":{"rendered":"<p>In 2016, I wrote a Python program that looks up the etymologies of words in a given text and color-codes them with HTML tags. I meant it as a tool to let writers easily visualize the register of their writing, \u00e1 la The Hemingway App. The text below is based off my original blog post, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2967","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/pages\/2967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2967"}],"version-history":[{"count":5,"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/pages\/2967\/revisions"}],"predecessor-version":[{"id":5907,"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=\/wp\/v2\/pages\/2967\/revisions\/5907"}],"wp:attachment":[{"href":"https:\/\/steamtrainsandghosts.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}