Title: | A Very Nice Interface to 'WordNet' |
---|---|
Description: | A very nice interface to Princeton's 'WordNet' without 'rJava' dependency. 'WordNet' data is not included. Princeton University makes 'WordNet' available to research and commercial users free of charge provided the terms of their license (<https://wordnet.princeton.edu/license-and-commercial-use>) are followed, and proper reference is made to the project using an appropriate citation (<https://wordnet.princeton.edu/citing-wordnet>). |
Authors: | Chung-hong Chan [aut, cre] |
Maintainer: | Chung-hong Chan <[email protected]> |
License: | GPL (>= 3) |
Version: | 0.1.0 |
Built: | 2025-02-21 04:00:02 UTC |
Source: | https://github.com/chainsawriot/sehrnett |
To download the WordNet 3.1 data as a sqlite database. It runs only in an interactive R session. The size of the database is around 500MB. Please make sure you agree with the WordNet License.
download_wordnet(debug = FALSE) delete_wordnet()
download_wordnet(debug = FALSE) delete_wordnet()
debug |
a flag for debugging. You should keep it FALSE. (Try at your own risk!) |
TRUE if the database is found. FALSE if there is no database and it is not running in an interactive R session.
Search for lemma(s) in WordNet.
get_lemmas( x = c("very", "nice"), pos = c("n", "v", "a", "s", "r"), sensenum, lemmatize = TRUE )
get_lemmas( x = c("very", "nice"), pos = c("n", "v", "a", "s", "r"), sensenum, lemmatize = TRUE )
x |
character, one or more lemmas to be searched; it can also be a data.frame result from another |
pos |
character, a vector of part-of-speech labels: "n": Noun, "v": Verb, "a": Adjective, "s": Adjective satellite, "r": Adverb |
sensenum |
integer, if supplied, only those sensenum are selected. |
lemmatize |
logical, whether to lemmatize the |
a data frame containing search result
if (interactive()) { get_lemmas("king.n.10") }
if (interactive()) { get_lemmas("king.n.10") }
Search for outdegrees based on linkid. Various sugars are also provided with different default linkids.
get_outdegrees(x, linkid = 1) get_hypernyms(x) get_hyponyms(x) get_holonyms(x) get_meronyms(x) get_causes(x) get_antonyms(x) get_derivatives(x) get_pertainyms(x) list_linktypes()
get_outdegrees(x, linkid = 1) get_hypernyms(x) get_hyponyms(x) get_holonyms(x) get_meronyms(x) get_causes(x) get_antonyms(x) get_derivatives(x) get_pertainyms(x) list_linktypes()
x |
character, one or more Synset IDs to be searched, or a data.frame result from another |
linkid |
a vector of numeric linkids. Use |
a data frame containing search result
if (interactive()) { get_lemmas("dog", pos = "n", sensenum = 1) %>% get_outdegrees(linkid = 1) get_lemmas("dog", pos = "n", sensenum = 1) %>% get_hyponyms() get_lemmas("nice", pos = "a", sensenum = 1) %>% get_antonyms() }
if (interactive()) { get_lemmas("dog", pos = "n", sensenum = 1) %>% get_outdegrees(linkid = 1) get_lemmas("dog", pos = "n", sensenum = 1) %>% get_hyponyms() get_lemmas("nice", pos = "a", sensenum = 1) %>% get_antonyms() }
Search for Synset ID(s) in WordNet
get_synsetids(x = c("301590922", "108957024")) get_synonyms(x)
get_synsetids(x = c("301590922", "108957024")) get_synonyms(x)
x |
character, one or more Synset IDs to be searched, or a data.frame result from another |
a data frame containing search result
if (interactive()) { get_synsetids("106618544") }
if (interactive()) { get_synsetids("106618544") }