Go to file
Lloyd Hilaiel 5860846ee7 accesssor for Gloss 2017-01-26 10:47:55 -07:00
data first implementation 2016-07-07 16:12:25 -05:00
LICENSE some documentation and a license 2016-07-07 16:35:27 -05:00
LICENSE.wordnet add wordnet's license 2016-07-07 16:15:10 -05:00
README.md documentation updates 2016-07-07 16:04:18 -06:00
parser.go name change 2016-07-07 16:15:23 -05:00
read.go name change 2016-07-07 16:15:23 -05:00
wordnet.go accesssor for Gloss 2017-01-26 10:47:55 -07:00
wordnet_test.go name change 2016-07-07 16:15:23 -05:00

README.md

An in-memory Go Library for WordNet

This is a go language library for accessing Princeton's wordnet.

Implementation Overview

This library is a native golang parser for wordnet which stores the entire thing in RAM. This approach was taken for faster access times because the wordnet database sits in only about 80MB of ram, which is not a lot these days. Parsing the full data files takes around two seconds on a modest laptop.

Supported features

  • Lookup by term
  • Synonyms
  • All relation types (Antonyms, Hyponyms, Hypernyms, etc)
  • Iteration of the database
  • Lemmatization

Missing features

  • Morphology - specifically generating a lemma from input text

Example Usage

import (
    "log"

    "github.com/lloyd/wnram"
)

func main() {
    wn := wnram.New("./path")
    // lookup "yummy"
    if found, err := wn.Lookup(Criteria{Matching: "yummy", POS: []PartOfSpeech{Adjective}}); err != nil {
       log.Fatal("%s", err)
    } else {
       // dump details about each matching term to console
       for _, f := range found {
           f.Dump()
       }
	}
}

License

BSD 2 Clause, see LICENSE.