W ordnet L oom – a Multilingual W ordnet Editing System Focused on Graph-based Presentation (2018)

Abstract: The paper presents a new re-built and expanded, version 2.0 of WordnetLoom – an open wordnet editor. It facilitates work on a multilingual system of wordnets, is based on efficient software architecture of thin client, and offers more flexibility in enriching wordnet representation. This new version is built on the experience collected during the use of the previous one for more than 10 years of plWordNet development. We discuss its extensions motivated by the collected experience. A special focus is given to the development of a variant for the needs of MultiWordnet of Portuguese, which is based on a very different wordnet development model.

## introduction a wordnet is a complex graph of several types of nodes (e.g. lexical units 1 , synsets) and edges (e.g. lexical relations, synset relations). initially princeton wordnet development was based on manual editing of text files storing wordnet representation @xcite . such an approach was error prone and the files edited manually required a lot of error verification and maintenance. at the beginning of the plwordnet project in the year 2005, we developed a wordnet editing system, called wordnetloom in order to avoid problems with manual editing of wordnet representation. it was based on a database and graphical user interface (gui), and separated users from the internal representation of the wordnet. as plwordnet was developed by a team of linguists, it was important to provide distributed access to the system. wordnetloom has been constructed in a way providing support for the corpus-based wordnet de-1 a triple: lemma, part of speech, sense id. our goal is to present a new re-built and expanded, version of wordnetloom 2.0 facilitating work on a multilingual system of wordnets, based on an efficient software architecture of a thin client, and offering more flexibility in enriching wordnet representation. this new version originates from the experience collected during the use of the previous one that has clearly motivated the extensions. we will also discuss its applications and variants, with a special focus on the multi-wordnet of portuguese. ## related works the first popular wordnet editor was probably vis-dic @xcite . in visdic the relation definitions were still written in text windows, but an xml based format was utilised. vis-dic was a monolithic application directly working on xml files, contrary to its descendant de-bvisdic @xcite ) -a client-server, lexical database editor, based on a general platform for dictionaries called deb @xcite . debvisdic reimplemented and extended the functionality of visdic, and offered also more flexibility in adapting xml representation structures. data presentation was limited and there was no means for visual editing the relation structure. several other wordnet editors also do not provide elaborated visualisation for wordnet structures, e.g. hydra @xcite or omwedit (morgado da @xcite . a web-based system slowtool @xcite @xcite offers good ui and visual wordnet browsing and editing. however, presentation is always limited to a small fragment of the wordnet graph (up to two links distance) and there is no means for neither viewing larger parts, nor comparing different parts. visualisation of wordnet graphs in most tools follows a radial pattern: a synset in focus is presented in the middle and all links, irrespectively of their types are placed radially around the central element, e.g. slowtool or wordties @xcite . gernedit @xcite offers visualisation of the wordnet structure in the range selected by the user, but it is hierarchical and focused mainly on hypernymy. moreover the visual presentation does not allow for direct editing of the structures. wordnetloom introduced elaborated presentation of the relation graph and direct visual editing @xcite . as it is an open tool, it was used as a basis for the solution presented in this paper. ## basic assumptions wordnetloom 1.0 has been used for plwordnet development since 2005 and proved to be a generally useful system. thus, although software architecture has been reconstructed, the main philosophy of the system was preserved. in order to avoid errors in the representation format, all editing actions should be done only via gui client application and the results are stored in the central database. the xml-based format is secondary in relation to the database. wordnet-loom supports distributed group work by a group of linguists on the central database. substitution tests foot_0 are an intrinsic part of the relation definitions. test templates are kept together with the relation definitions in the database. before every editing decision is made, a test for a relation considered by the linguist is presented in a pop-up window and instantiated with the lemmas from the two synsets to be linked. a wordnet is a network of lexico-semantic relation, and a graph is the basic means for both browsing and editing the wordnet structure. a network of synsets linked by synset relations is visually presented on the screen as a graph. the user can freely browse the network by clicking on synsets and unfolding as many levels of relations as needed, see fig. 2 . every link can be added or removed directly on the graph presentation. this facilitates better comprehension of the wordnet structure, shorter connection between the editing intention and the resulting change in the wordnet structure, as well as a better understanding of the consequences of the intended and/or performed action to the wordnet structure beyond the local connections of the edited synset. the same system and the same presentation means should also support the construction of the mappings between wordnets. thus wordnets for different languages should be presented simultaneously on the screen as graphs that are connected by inter-lingual relations which are also visually presented on the screen. the editing of the mapping is performed in a way similar to monolingual editing by linking synsets or deleting links selected on the screen with the mouse. every wordnet includes also elements of the description that are not relations but attributes, e.g.: glosses, usage examples, and different attributes, e.g. stylistic register, sentiment polarity etc. as this kind of information is getting richer with the subsequent versions of plwordnet, we need also to introduce different perspectives on wordnet, not only graph-based, but also more dictionaryoriented. it is not also possible to fit everything into one single screen graph-presentation -the graph would be too cluttered. attributes for a synset in focus are presented in side panels. word-netloom offers three main perspectives on data: the perspective of lexical units, visualisation and synsets. the perspective of lexical units presents the wordnet as a dictionary. the searching is focused on lexical units (henceforth, lus) and their relations, for a selected lu all synsets which it belongs to are listed. in addition the complete description of its attributes and lexical relations is shown. the synset perspective is organised in similar way, but around synsets as basic elements, and the visualisation perspective presents visually wordnet as a network of synsets. for a synset in focus its lus are presented in the side panels together with their lexical relations. ## graph-based presentation a wordnet is intrinsically a graph. lexical meanings are described by subgraphs of lexicosemantic relations. thus a visual presentation of the wordnet graph should be a basis for a wordnet editing system. from a formal point of view, there are not many restrictions on the shape of the wordnet graphs. however, the semantics of the relations reveals two basic groups of wordnet relations: relations expressing some aspects of hierarchy (e.g. hypernymy/hyponymy, type/instance) and other relations (e.g. holo/meronymy). the former defines some levels: synsets located at the upper levels are more general, those on the lower -more specific. the latter group does not show any preference concerning the location of elements belonging to one link (a graph arc) on the screen. in many systems, a wordnet graph is visualised in way following the radial scheme, i.e. for a synset in focus its nearest neighbours are presented around it in equal distance, e.g. @xcite or the system tries to cover equally the whole area of the screen. in both cases, the important characteristic features of the hierarchical relations are lost together with the information about the hypernymic paths and top synsets which is crucial for the wordnet editors. the wordnet graph cannot be also presented as a tree, because, firstly, the majority of its relations do not form a tree, and secondly, truly hierarchical relations would be visually lost in such a presentation with a significant loss the information for the editors. in order to avoid drawbacks of both basic presentation paradigms, an unique combination of the radial and tree-like presenta-tion was proposed for wordnetloom. structure relations are presented along the vertical dimension, while other relations are presented radially around synsets, but in a way limited to horizontal zone of limited height centred on a given synset (i.e. only two sectors are used for radial presentation for each synset). the proposed visualisation scheme is illustrated in fig. 1 . in fig. 1 , the octagonals represent synsets, p 2.3 and e 3.1 labels -wordnets, navy blue triangles can be clicked to unfold hidden branches, red to fold those shown. if a very large number of links for a synset and presentation direction (top/down, left/right), exceeds a threshold, then the rest is hidden in the green circle symbol and can be 'taken out' by user clicking it. the threshold, categorisation of particular relation types as vertical or horizontal, as well as link labels and colours used are defined in the wordnetloom set-up file. division of relations into synset and lexical relations is orthogonal to the previous one. moreover, lexical relations are linked directly to lus as graph nodes. in order to visualise lexical relations and synset relations on the same screen, it would be necessary to present two inter-connected graphs, in fact, namely, the graphs of synsets and lus. what is worse, a synset can be connected to a number of lus on average. thus, it would be too much information for one screen to present both graphs in the same time. such a design of the screen was evaluated by linguists as too much cluttered to be useful. thus, only synset graph is visually presented, and for a synset in focus its lus are presented in the middle-right panel, see fig. 1 , and the relations of the selected lu are textually presented in the bottom-right panel. the largest synsets can include even more than 20 lus, but the average size is much smaller, e.g. less than 2 in plwordnet. however, the initial tests of the visualisation showed that when the number of the presented synsets on the screen approaches 10, it starts to be perceived as cluttered, when all synset members are visible inside the synset symbols. a kind of dynamic adaptation of the number of synset members presented would be an unnecessary complication (it depends also on synset sizes). so, finally, only one synset member, the first lu from a synset, is presented as its representative, the rest is presented in the middle-right panel. its different sub-panels give access to the attributes of the given synset. for a lu selected among the synset members, its list of the lexical relations in shown in the bottom-right panel. attributes of the synset lus can be inspected with the context menu (right click). users can dynamically open several visualisation panels, e.g. to present search results, compare structures, create links between distant sub-trees or synsets from two wordnets etc. ## architecture contrary to several other systems, e.g. debvis-dic, wordnetloom 1.0 was written in java, and the same approach was followed in the version 2.0. since java was quite stable, wordnetloom 1.0 could be easily installed by non-technical users (by simply unpacking files including the jar file). the java-based solution was free of the problems related to the changing versions of web-browsers (like plug-ins do have), and java provided more flexibility in the implementation in contrast to the script languages used in the web. the construction of wordnetloom 1.0 was initiated in 2005 as a client-server application with a direct connection to the database. the applied trigger mechanism allowed to encapsulate the whole system with a change control mechanism on selected database tables. wordnetloom 1.0 supported the polish language only. the lack of dynamic dictionaries made it difficult to expand and every change in the database required redistribu-tion of the application. at the same time, several supporting tools based on the central wordnet database such as the monitoring system and statistics, api rest, mobile application and web application were created. in order to adapt the system to new functionalities and other wordnets, we changed its architecture and enhanced the role of the central module which is shared between peripheral applications to increase maintainability of the whole system. in the new three-layer architecture, presented in fig. 3 an additional, intermediate layer -a service layer -was introduced. this layer encompasses now the entire business logic code responsible for crud foot_1 operations and validation. the trigger mechanism has been replaced by the hibernate envars foot_2 module allowing the easier undoing of changes. the new schema migration mechanism has been introduced and the application has been secured by mechanisms provided with the wildfly server. the database schema itself has been rebuilt to be similar to an uby-lmf structure @xcite , new tables have been added, allowing for dynamic construction of dictionaries and a localization mechanism. wordnetloom's thick client was transformed into a thin client model where all business logic was transferred to the ejb foot_3 service module. some of the ui perspectives for data presentation in tabular manner were removed from the client, while the graphical visualization perspective became the main workspace with all functionality accessible, especially the searching facilities have been expanded in this perspective to fully encompass both synsets and lus foot_4 . the language of ui can be changed in any moment. the user can also choose which lexicons, mostly wordnets, they want to work with in the given moment. in the previous version the user was working with all lexicons at the same time. the constantly increasing number of relations, both within individual lexicons and across them obscured the graph visualization window. in order to make work more efficient, a functionality to hide selected lexicons was introduced. the key business logic module has been implemented as an ejb module so that it can be a common unitary element. it offers api access to the data layer and, at the same time, has a common extensible validation module aimed at preventing the establishment of wrong relations and thus forcing the correctness of data input. the key tables are audited and, in addition, a special table contains a register of all operations carried out. a very important feature of our new version of the system is the fact that each element belongs to a certain lexicon, that gives the possibility to expand with new collections of elements. the server is based on mysql 5.7 database management system foot_5 and wildfly 10.1.0 foot_6 . for the construction of the system we have used also the following frameworks: java ee 7 enterprise edition platform, jpa 2.+ foot_7 (hibernate 5+ foot_8 ), ejb 3.1 11 , jax-rs 12 , jsf 13 (primefaces 14 ), java swing 15 and jung 2 16 . ## extensions and applications the architecture of the version 2.0 has been significantly improved in comparison to the previous one, but wordnetloom has been used for more than 10 years for plwordnet editing (resulting in ≈200k lemmas, ≈300k lus and ≈200k interlingual mappings processed), as well the new version has become a basis for system's adaptations to other wordnets, e.g. a portuguese wordnet. ## conclusions and further works wordnetloom incorporates more than 10 years of experience in the development of a very large wordnet by many linguists on daily basis and this rich experience has become a good basis for the development of new version improved with respect to both: technology and functionality. the system is open 19 . its most unique feature is direct work on the visually presented wordnet graph, as well as support for simultaneous editing and interlinking of many wordnets (editors see the multilingual structures they are going to map). wordnetloom adaptation to the needs of the portuguese wordnet developed according to completely different method than plwordnet showed system's potential, and paved way for its adaptations to other resources and tasks. we plan to integrate both variants and continue collaborative development of the system. https://github.com/clarin-pl/ wordnetloom