This is an interactive semantic domains visualizer web app. Given an English noun, this will display the hierarchy of semantic domains that word falls under according to English WordNet. In Ancient Greek mode, it can accept either an Ancient Greek word typed in Greek unicode or an English word. If an English word is given, it will be translated into an appropriate Ancient Greek word. From there, it will provide for Ancient Greek a function similar to the English mode.
Semantic domains are categories of meaning arranged in a hierarchy which are filled up by words which fit that meaning. "German shephard" might be in the semantic domain "dog" while "dog," in turn, may be in the semantic domain "animal." Words can be arranged in such a manner until they ultimately all fall under the root node "entity."
I have an interest in applying computational linguistic methods to the New Testament and Ancient Greek. Sometimes when explaining what I'm doing, it's helpful to first show the same concept in English. Hence, I made this app with an English option. This project is an important stepping stone along the path to quantitatively measuring a more complex linguistic phenomena known as semantic preference. Unfortunately, the tools needed to properly continue the project for Ancient Greek are still under development at Harvard and elsewhere. In the meantime, I wanted this code to be prepared for the time when their project is in a usable state.
Among the several strung together APIs, the most logically challenging aspect was connecting WordNET to Plotly's Sunburst output. WordNet will sometimes assign the same synset to multiple hypernyms. The input of this sunburst diagram, however, required that each synset have a unique ID (which is displayed upon hovering) with only a single parent. The problem is compounded as multiple synsets along a path from a leaf node to a top node may have multiple hypernyms. The number of nodes that require unique renaming grows exponentially with each multi-parent node along the same path.