Skip to content

Commit bc5ef51

Browse files
committed
some documentation and a license
1 parent e84036c commit bc5ef51

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

LICENSE

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Copyright (c) 2016 Lloyd Hilaiel. All rights reserved.
2+
3+
Redistribution and use in source and binary forms, with or without
4+
modification, are permitted provided that the following conditions are
5+
met:
6+
7+
* Redistributions of source code must retain the above copyright
8+
notice, this list of conditions and the following disclaimer.
9+
* Redistributions in binary form must reproduce the above
10+
copyright notice, this list of conditions and the following disclaimer
11+
in the documentation and/or other materials provided with the
12+
distribution.
13+
14+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
18+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
20+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

README

Whitespace-only changes.

README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
## An in-memory Go Library for WordNet
2+
3+
This is a go language library for accessing [Princeton's wordnet][].
4+
5+
## Implementation Overview
6+
7+
This library is a native golang parser for wordnet which stores the
8+
entire thing in RAM. This approach was taken for faster access times
9+
because the wordnet database sits in only about 80MB of ram, which is
10+
not a lot these days. Parsing the full data files takes around two
11+
seconds on a modest laptop.
12+
13+
[Princeton's wordnet]: http://wordnet.princeton.edu
14+
15+
## Supported features
16+
17+
* Lookup by term
18+
* Synonyms
19+
* All relation types (Antonyms, Hyponyms, Hypernyms, etc)
20+
* Iteration of the database
21+
* Lemmatization
22+
23+
## Example Usage
24+
25+
```golang
26+
import (
27+
"log"
28+
29+
"github.com/lloyd/wnram"
30+
)
31+
32+
func main() {
33+
wn := wnram.New("./path")
34+
// lookup "yummy"
35+
if found, err := wn.Lookup(Criteria{Matching: "yummy", POS: []PartOfSpeech{Adjective}}); err != nil {
36+
log.Fatal("%s", err)
37+
} else {
38+
// dump details about each matching term to console
39+
for _, f := range found {
40+
f.Dump()
41+
}
42+
}
43+
}
44+
```
45+
46+
## License
47+
48+
BSD 2 Clause, see `LICENSE`.

0 commit comments

Comments
 (0)