Title: | A Very Nice Interface to 'WordNet' |
Version: | 0.1.0 |
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). |
License: | GPL (≥ 3) |
Encoding: | UTF-8 |
RoxygenNote: | 7.2.3 |
URL: | https://github.com/chainsawriot/sehrnett |
BugReports: | https://github.com/chainsawriot/sehrnett/issues |
Suggests: | covr, testthat (≥ 3.0.0) |
Config/testthat/edition: | 3 |
Imports: | DBI, RSQLite, magrittr, tibble, purrr, utils, dplyr |
Config/testthat/parallel: | true |
NeedsCompilation: | no |
Packaged: | 2023-03-02 13:56:04 UTC; chainsawriot |
Author: | Chung-hong Chan |
Maintainer: | Chung-hong Chan <chainsawtiney@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2023-03-02 14:20:02 UTC |
Pipe operator
Description
See magrittr::%>%
for details.
Usage
lhs %>% rhs
Arguments
lhs |
A value or the magrittr placeholder. |
rhs |
A function call using the magrittr semantics. |
Value
The result of calling rhs(lhs)
.
Download And Delete WordNet SQL Database
Description
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.
Usage
download_wordnet(debug = FALSE)
delete_wordnet()
Arguments
debug |
a flag for debugging. You should keep it FALSE. (Try at your own risk!) |
Value
TRUE if the database is found. FALSE if there is no database and it is not running in an interactive R session.
Search For Lemmas in WordNet
Description
Search for lemma(s) in WordNet.
Usage
get_lemmas(
x = c("very", "nice"),
pos = c("n", "v", "a", "s", "r"),
sensenum,
lemmatize = TRUE
)
Arguments
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 |
Value
a data frame containing search result
Examples
if (interactive()) {
get_lemmas("king.n.10")
}
Get outdegrees
Description
Search for outdegrees based on linkid. Various sugars are also provided with different default linkids.
Usage
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()
Arguments
x |
character, one or more Synset IDs to be searched, or a data.frame result from another |
linkid |
a vector of numeric linkids. Use |
Value
a data frame containing search result
Examples
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 IDs in WordNet
Description
Search for Synset ID(s) in WordNet
Usage
get_synsetids(x = c("301590922", "108957024"))
get_synonyms(x)
Arguments
x |
character, one or more Synset IDs to be searched, or a data.frame result from another |
Value
a data frame containing search result
Examples
if (interactive()) {
get_synsetids("106618544")
}