Skip to content

Commit

Permalink
minor changes to entity_types_map
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophLeonhardt committed Apr 18, 2024
1 parent ae46578 commit c5786a5
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Expand Up @@ -2,7 +2,7 @@ Package: dbpedia
Type: Package
Title: R Wrapper for DBpedia Spotlight
Version: 0.1.2.9006
Date: 2024-04-16
Date: 2024-04-18
Authors@R: c(
person("Andreas", "Blaette", role = c("aut", "cre"), email = "andreas.blaette@uni-due.de", comment = c(ORCID = "0000-0001-8970-8010")),
person("Christoph", "Leonhardt", role = "aut")
Expand Down
8 changes: 5 additions & 3 deletions R/entity_types.R
Expand Up @@ -43,7 +43,7 @@ setGeneric(
#' corpus_reshape(to = "paragraphs")
#'
#' uritab_paragraphs <- get_dbpedia_uris(
#' x = inaugural_paragraphs,
#' x = inaugural_paragraphs[2], # single paragraph
#' language = "en",
#' max_len = 5600L,
#' confidence = 0.5,
Expand All @@ -58,12 +58,12 @@ setGeneric(
#' "LOCATION" = "Place"
#' )
#'
#' entity_types_map(
#' categories <- entity_types_map(
#' uritab_paragraphs[["DBpedia_type"]],
#' mapping_vector = mapping_vector_character
#' )
#'
#' # For the entire data.table and mulitple types sources:
#' # For the entire data.table and multiple types sources:
#'
#' mapping_vector_dt = c(
#' "PERSON" = "DBpedia:Person",
Expand Down Expand Up @@ -112,6 +112,8 @@ setMethod(
return(category)
}
)

return(retval)
}
)

Expand Down
6 changes: 3 additions & 3 deletions man/entity_types_map.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tests/testthat/test-entity_types_map.R
Expand Up @@ -166,7 +166,7 @@ test_that(

# Examples based on processing quanteda's data_corpus_inaugural with the
# English DBpedia Spotlight endpoint (entities occur in 2013-Obama).

types_vector <- c("|Species|Person|Eukaryote|Animal|Politician|",
"|Organisation|Agent|Legislature|",
"|Place|Location|CelestialBody|Planet|",
Expand Down

0 comments on commit c5786a5

Please sign in to comment.