Skip to content

Commit

Permalink
rudimentary tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Blätte authored and Andreas Blätte committed Feb 26, 2024
1 parent e492359 commit 3da34f7
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
3 changes: 2 additions & 1 deletion DESCRIPTION
Expand Up @@ -29,7 +29,8 @@ Suggests:
knitr,
WikidataQueryServiceR,
GermaParl2,
quanteda
quanteda,
testthat
Remotes:
polmineR=github::PolMine/polmineR@dev
AdditionalRepositories: https://polmine.github.io/drat/
Expand Down
4 changes: 4 additions & 0 deletions tests/testthat.R
@@ -0,0 +1,4 @@
library(testthat)
library(dbpedia)

test_check("dbpedia")
17 changes: 17 additions & 0 deletions tests/testthat/test_dbpedia.R
@@ -0,0 +1,17 @@
testthat::context("dbpedia")

test_that(
"get_dbpedia_uris() for quanteda corpus",
{
library(quanteda)

uritab <- quanteda::data_char_ukimmig2010[1:3] %>%
corpus() %>%
get_dbpedia_uris(
api = "http://api.dbpedia-spotlight.org/en/annotate",
language = "en",
progress = FALSE,
verbose = FALSE
)
}
)

0 comments on commit 3da34f7

Please sign in to comment.