A Graph for Wordnet Applied to Freeform Linguistic Exploration

A Graph for Wordnet Applied to Freeform Linguistic Exploration

WAFFLE: A Graph for WordNet Applied to Free-Form Linguistic Exploration Berk Ekmekci & Blake Howald Thomson Reuters Special Services, LLC 1410 Spring Hill Road, Suite 125 Mclean, VA 221022 [berk.ekmekci, blake.howald]@trssllc.com Abstract [establishment.n.04] - a public or private struc- ture including buildings and equipment for busi- The WordNet database of English (Fellbaum, 1998) is a key source of semantic informa- ness or residence tion for research and development of natu- [establishment.n.05] - any large corporation ral language processing applications. As the [establishment.n.06] - (ecology) the process by sophistication of these applications increases which a plant or animal becomes established in a with the use of large datasets, deep learn- ing, and graph-based methods, so should the new habitat use of WordNet. To this end, we introduce [establishment.n.07] - the cognitive process of es- WAFFLE: WordNet Applied to FreeForm Lin- tablishing a valid proof guistic Exploration which makes WordNet available in an open source graph data struc- Each of these senses are organized by individ- ture. The WAFFLE graph relies on platform- ual synsets (synonym sets) and labeled for refer- agnostic formats for robust interrogation and ence with a word.part-of-speech.number structure. flexibility. Where existing implementations of Sysnsets include definitions, examples, lemmas, WordNet offer dictionary-like lookup, single- synonyms (e.g. establishment.n.01 is equivalent degree neighborhood operations, and path- to constitution.n.02) and are organized into larger based similarity-scoring, the WAFFLE graph hierarchical relationships (Figure1), which can fa- makes all nodes (semantic relation sets) and re- lationships queryable at scale, enabling local cilitate the computation of paths between synsets and global analysis of all relationships with- to quantitatively approximate word similarity. For out the need for custom code. We demonstrate example, there are 2 hops (steps up or down the hi- WAFFLE’s ease of use, visualization capabil- erarchy) between establishment.n.02 and .05 com- ities, and scalable efficiency with common pared to 9 hops between .02 and .06 (organized in- queries, operations, and interactions. WAF- stitutions being more like corporations rather than github.com/TRSS-NLP/ FLE is available at plants or animals establishing a new habitat). WAFFLE. Figure1 is based on noun hypernym and hy- 1 Introduction ponym relations, but WordNet includes additional parts of speech (verb, adjective, adverb) and asso- WordNet (Miller, 1995; Fellbaum, 1998) is a ciated relations - e.g. entailment between verbs, database of English words with associated lexical antonyms between adjectives, and derivationally properties and semantic relations. For example, related forms for all parts-of-speech. WordNet has WordNet includes seven semantically distinct been used for building dictionary and thesaurus ap- senses for the noun “establishment”: plications as well as a range of natural language processing tasks such as: word sense disambigua- the act [establishment.n.01/constitution.n.02] - tion tasks (Patwardhan et al., 2003; Navigli, 2009; of forming or establishing something Loureiro and Jorge, 2019), document retrieval [establishment.n.02/institution.n.01] - an organi- (Rada et al., 1989; Srihari et al., 2000), informa- zation founded and united for a specific purpose tion extraction (Stevenson and Greenwood, 2005; [establishment.n.03/administration.n.02] - the Atkinson et al., 2009), and querying (Bulskov et al., persons who make up a body for the purpose of 2002; Li et al., 2003) for recommender (Blanco- administering something Fernandez´ et al., 2008) and question-answer (Tapeh 147 Proceedings of Second Workshop for NLP Open Source Software (NLP-OSS), pages 147–157 Virtual Conference, November 19, 2020. c 2020 Association for Computational Linguistics Figure 1: WordNet is-a (noun-based hypernym/hyponyms) hierarchy for establishment. and Rahgozar, 2008) systems. approaches. Section4 discusses related methods of The current version of WordNet (117,000 WordNet access. Section5 concludes with WAF- synsets in version 3.1 with 27 relation types) is FLE’s access and licensing details with plans for available through an interactive browser, APIs, future versions. and stand alone database files which can be cus- tomized.1 However, beyond recreating common 2 WAFFLE Graph Overview functionality, we believe there is an increasing need 2.1 Data Format for the availability of WordNet in an open source graph-based data structure to support large-scale Per its official description, WordNet’s database is use and research (e.g. for deep learning (Yuan et al., made available in: 2016; Diao et al., 2018; Vial et al., 2019; Kobylin- ski and Wasiluk, 2019), hierarchical embeddings ... an ASCII format consisting of eight (Bernardy and Maskharashvili, 2019), and graph- files, two for each syntactic category. Ad- based approaches generally (Naskre¸t et al., 2018; ditional files are used by the WordNet Pinter and Eisenstein, 2018). These use cases lever- search code but are not strictly part of age not only the content of WordNet, but need to the database.... Each index file is an al- do so with increasing sensitivity to the structure phabetized list of all the words found of WordNet. This is not only to operate more effi- in WordNet in the corresponding part of ciently, but to open up additional potential avenues speech. On each line, following the word, of research. To satisfy this need, we present WAF- is a list of byte offsets (synset offset s) in FLE: WordNet Applied to FreeForm Linguistic the corresponding data file, one for each Exploration as a fully-connected queryable graph synset containing the word.... Pointers representation of WordNet to provide: (1) flexibil- are followed and hierarchies traversed ity in exploring all of WordNet’s relations across by moving from one synset to another via synsets and hierarchies rather than particular part- the synset offset s.2 of-speech-based subgraphs; (2) scalable processing for large datasets; and (3) support for all common The two files for each syntactic category refer to operations on WordNet (look-up, similarity mea- a data and an index file, with the data file holding sures). attributes and relationships of each word in Word- The remainder of this paper is structured as fol- Net and index containing the mapping of words to lows: Section2 introduces the details of WAF- synsets present in the data file. These relationships FLE’s graph structure, computation and descriptive and indices are defined as byte offsets, which have statistics. Section3 demonstrates common Word- the advantage of allowing for APIs working with Net operations compared to non-graph structure the WordNet files to quickly traverse the datafile at 1http://wordnetweb.princeton.edu/perl/ 2https://wordnet.princeton.edu/ webwn frequently-asked-questions 148 Figure 2: (a) The core constellation of all wordsense-wordsense relationships within WordNet, with nodes colored and scaled according to degree (darker and smaller = lower degree; brighter and larger = higher degree). In addition to the central network containing interconnected wordsenses, there exist many disconnected sub-networks that appear when synsets are not rendered. Several of these isolated networks are visible surrounding the main network. (b) A detailed view of the northwest corner of the graph in (a), with closely clustered neighborhoods visible as well as long chains of wordsenses that link otherwise disparate regions. query-time, but come at the cost of being an unintu- (Bastian et al., 2009) and Cytoscape.3 For addi- itive relationship-building and indexing scheme for tional utility, WAFFLE also exports the graph as a humans. Further, the number of columns in each single .graphml file, a widely-supported graph in- row within both index and data files are variable; terchange format that contains both node and edge for instance, a data entry with 3 synset-to-synset information (Brandes et al., 2002).4 WAFFLE is relationships will have 8 more columns than an designed to work with the version 3.3 data provided entry with 1 such relationship, as each relation- on GitHub under Apache 2.0 license by the main- ship introduces 4 new fields. This design choice tainers of the Natural Language Tool Kit (“NLTK”) makes the data terse, but increases user effort to (Bird et al., 2009), but is compatible with any data parse the structure of and relationships within each following the WordNet specification.5 In the spirit row when loading into relational formats, graph of open source software and compatible with the databases, and desktop network analysis software. original Wordnet 3.0 license, we present all origi- nal components of WAFFLE on GitHub under an open MIT license.6 WAFFLE parses the data within the data file and reformats the results into graph representations that 2.2 Construction Methodology trade off representation compactness (previously optimized for quick on-disk or in-memory lookup) WAFFLE runs in Python 3 (Van Rossum and Drake, for human-legibility and advanced graph analysis 2009), and combines a custom parser for the Word- when loaded into supported tools (c.f. Section 2.2). Net format with auxiliary functions to construct The essential form of the transformed data format an in-memory graph using the NetworkX library is that of a node list and edge list, output as .CSV (Hagberg et al., 2008). The resulting graph contains and .JSON files. These files catalog the attributes 3https://cytoscape.org (e.g. type, part-of-speech, definition, example sen- 4Specification found at https://graphml. tences) and relationships (i.e. source node, type, graphdrawing.org/specification.html 5 edge attributes, and target node) of each item in https://github.com/nltk/wordnet 6https://wordnet.princeton.edu/ WordNet, respectively. This representation is ready license-and-commercial-use, and https: for import in such network analysis tools as Gephi //opensource.org/licenses/MIT 149 approximately 288,000 nodes and 392,000 relation- not yet its identity (the synset it belongs to may ships between them, and offers a starting point for be later in the file).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    11 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us