Towards Dynamic W ordnet: Time Flow Hydra (2022)

Abstract: Hydra is a Wordnet management system where the Synsets from different languages live in a common relational structure (Kripke frame) with a user-frendly GUI for searching, editing and alignment of the objects from the different languages. The data is retrieved by means of a modal logic query language. Despite its many merits the system stores only the current state of the wordnet data. Wordnet editing and development opens questions for wordnet data, structure and its consistency over time. The new Time Flow Hydra uses a Dynamic wordnet model with a discrete time embeded where all the states of all the objects are stored and accessed simultaneously. This provides the ability to track the changes, to detect the desired and undesired results of the data evolution. For example, we can ask which objects 10 days ago had 2 hyponyms, and 5 days later have 3.

## introduction the wordnets in the world are evolving and growing in number. a lot of applications for development and visualization of such databases were developed in the last decades and one of them was the system hydra whose main advantage was the modal logic query language for wordnet. several years ago we introduced a new web version of the system with a simple, fast and comfortable interface. it allows the visualization and editing of wordnets for several languages simultaneously and concurrently by many users by means of a mobile first web interface. the system also has the ability to clone / replicate data from other languages in the database, which facilitates and accelerates the development of new synonymous sets. this can also be used for linguistic comparisons of language features. one of the challenges in the wordnet world was the alignment of the databases developed for different languages. the concurrent work of different teams in different languages in a single environment could greatly facilitate this task and the overall the wordnet development. in this paper we are presenting a new dynamic model for wordnet, which guarantees the integrity of the data and all intermediate stages of its development. it also implies timely detection of data and structure inconsistency and this saves the very expensive human resources. the user has access to the data states in all the moments of its evolution at the same time. the user is also provided with a powerful modal query language with a new temporal modalities. hydra prevents the loss of data even in the case of malicious user behaviour. the system has much better database model and the queries are processed much faster than in the previous versions, some of them are in orders of magnitudes faster. ## wordnet wordnet is a relational model @xcite of the language where the language concepts are represented as synonymous sets related to each other with over 20 semantic and lexical binary relations like hyperonymy, meronymy, antonymy and others. the main one is the super-subordinate relation hyperonymy (aka is-a). it links the more general concepts like animal with its more specific ones like horse and bear. this creates a hierarchical structures of concepts (noun and verb) in the language. ## wordnet for many languages wordnet development started for english in princeton @xcite and then this idea was taken up for more than 40 languages. most of these are developed or are still in development using the so called synchronous model where the hyperonymy structure follows this of the princeton wordnet. using comon identifier or alignment mappings the synsets encoding similar concepts in the different languages are linked to each other. such relation or identifier is called ili -inter lingual index. these large wordnet databases with this relational model proved to be very useful for many linguistic tasks but experience several important problems. being developed by different teams using different software platforms, file formats, databases, etc. the wordnet databases are stored and maintened separately. the alignment (ili manintanace) is made periodically usually for particular language pairs and particular version of these wordnet databases. collaborative interlingual index was developed to help reduce the sparse ili mapping problem, but it did not succeed much. some of the main problems in the past are the language database separation and the inconsistent synset identifiers in the central princeton wordnet database. ## static model for wordnet in a fixed moment of time we have a family of synonymous sets (synsets) -the concepts in the language -interconnected by semantic relations like hyperonymy and meronymy. diving in them we find some associated data like part of speech and the words that they are comprised of. we call a word in a particular synset literal. keep in mind that a single word can be found in several synsets while the literals are unique (can be thought as ⟨synset, word/compound⟩ pairs). these literals are connected by lexical relations. in a wordnet database we also have some text data like sample usage, notes about some particular synset or literal features, etc. we call this data notes. the notes can be thought as ⟨synset/literal, text⟩ pairs. ## wordnet as a kripke frame let's consider 3 types of objects -synset, literal, note for the objects in wordnet databases. we define special binary relations to encode the relationships between them. in this way literal relation connects a particular literal to its parent synset. usage relation connects a note object with the synset that it is usage example of. we also have the usual relations such as hyperony, meronymy, antonymy, etc. we obtain a kripke frame ⟨w, r⟩, where w is a three-sort universe and r is a set of binary relations between the objects in it. such a frame naturally introduces a modal logic language, which we'll present in the next sections. each object in wordnet can be considered as a feature structure with a fixed set ot features depending on its type. thus the synsets are provided with these features: pos (part of speech), lang (language code), ili (common identifier for the same concept in the different languages). literals have word and lemma features, while notes have note (the text they represent). all of the 3 types have some common features like id (unique identifier for the static model), userid -the identifier of the user that made this object, etc. ## hydra the wordnet database management system hydra @xcite was created in 2006 in order to address the problems found in the development of bulnet -bulgarian wordnet. a new model for wordnet as a kripke frame was introduced where all the linguistic data for the various languages (most importantly princeton wn and bulnet) live in a single relational structure. several years later, the system was developed as a modern spa web application @xcite . the system is in production http://dcl.bas.bg/bulnet with wordnets for 22 languages. the data searching is made by means of a modal logic query language. ## dynamic model for wordnet an ordinary static wordnet database is an incomplete instantaneous description of the language. there are synonymous sets in the languages that are not defined, some of the relations are not fully instantiated and the wordnet databases for the different languagages are in different stages of their development. there are also some specific concepts for particular languages. over time, both the language and its wordnet representation change and evolve. during this evolution, we have a different state of wordnet at any given time. this raises questions about the consistency of the data and its structure defined by means of the binary relations in this time flow. if we take the snapshots of wordnet in the static model, we get a set of kripke frames. let's supply each object in each frame with the timestamp of its frame. now let's take the union of the resulting set of disjoint frames. we get a single kripke frame with all the manifestations of all of the objects in the wordnet. formally it is the set: ## query language the construction of wordnet and its editing opens questions about the change of data and their structure (evolution) over time. one may be interested in the availability of certain properties of the data and the relations. he would like to easily detect problems when they occur, to easily correct them without returning to a state with many changes made by many users, as is the case with the use of a backup. for example, object 1 has changed in the past. meanwhile 2 and 3 have been changed (corrected), 4 has been created. we detect a problem with object 1 and its relations -there is some inconsistency in the structure. with the dynamic model, you can trace the whole process and find out exactly when and why the problem occurred. we do it by means of a modal logic language for wordnet which was created for the early implementations of hydra and further developed with addition of temporal modalities. the system works with so called model checking -for a given modal formula, the set of the objects in which the formula is true is returned. ## example queries let's see some useful queries. proceedings of clib 2022 10 graphical user interface and implementation hydra is implemented in javascript. it consists of a modern spa (single page application) web app and a rest api service. the wordnet data is stored in a postgres database and the queries are translated to sql queries. there is a preprocessing step where for each subformula its model time is determined. while most of the relations are stored in the database, some are implemented directly in the translations of the formula -such are the universal relation u and the transitive closures and reflexive and transitive closures of the other relations. important feature is that no data can be lost during wordnet development even if there is some hostile user. every change in the data creates a new copy of the object or relational instance touched with the same id but having the new data. for instance, when an object is deleted, a new record for it is created (operation record) where it is marked as 'deleted'. at any point the user can see the data as it used to be in the past with the so-called time machine -the user opens a dialog and selects a moment in the past and the data is as it used to be at this given time. the gui is very simple and powerful. it has a search panel that has 3 modes for searchingusing word, regular expression and a formula. the first 2 options find the synsets that have literals that match the provided word/regular expression. the latter is using the defined modal query language and it's much more powerful. there are 2 modes to visualize the data found. the first one (called 'single') is visualizing the object selected from the list of the found items. the second one is aligning a pair of language wordnets that are present in the system. when the user selects a particular item from the list of the found items, the corresponding copies in the aligned languages are visualized. in this way the user can search some spanish word and see the aligned corresponding entries in french and english for example. the visualization of an object consists of its static data (like pos and language for the synsets) and the relations -all the connected objects by all the relations. the view is recursive and the data for the related objects is visualized on demand. hydra is also a fully-fledged editor for this wordnet data. a user with sufficient rights can put an object into edit mode, the representational controls are replaced with edit controls and he/she can edit and save the data. relational pairs are added by means of a wizard. these changes are sent to all the other users by means of notifications. the main achievement of our work is the expantion of hydra's capabilities with time operators and the most valuable among them is the feature that when something is wrong and damaged in wordnet, we can repair it easily, as well as to understand the cause and user responsible for this error. one weakness is that the use of the system in this form requires competence in logical languages. to overcome this we are developing an gui assistant to help the linguists with predefined queries and schema queries. for more complex queries some skills would remain required of course.