From 08e957a48b22eb2884cca82d359bfeb13b3874cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Bl=C3=A4tte?= Date: Sat, 4 May 2024 21:11:47 +0200 Subject: [PATCH] all get_dbpedia_uris()-methods have arg types_src #55 --- R/dbpedia.R | 10 ++++++++++ man/entity_types_map.Rd | 2 +- man/get_dbpedia_uris.Rd | 5 +++++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/R/dbpedia.R b/R/dbpedia.R index 96e6980..cc87327 100644 --- a/R/dbpedia.R +++ b/R/dbpedia.R @@ -618,6 +618,7 @@ setMethod( doc_id = NA_character_, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), verbose = TRUE ) { @@ -633,6 +634,7 @@ setMethod( doc_id = doc_id, types = types, support = support, + types_src = types_src, verbose = verbose ) } @@ -755,6 +757,7 @@ setMethod( logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), expand_to_token = FALSE, drop_inexact_annotations = TRUE, verbose = TRUE @@ -796,6 +799,7 @@ setMethod( doc_id = name(x), types = types, support = support, + types_src = types_src, verbose = verbose ) @@ -938,6 +942,7 @@ setMethod( logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), max_len = 7990L, overlap = 1000L, expand_to_token = FALSE, @@ -966,6 +971,7 @@ setMethod( logfile = logfile, types = types, support = support, + types_src = types_src, expand_to_token = expand_to_token, verbose = if (progress) FALSE else verbose ) @@ -1016,6 +1022,7 @@ setMethod( logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), verbose = TRUE, progress = FALSE ) { @@ -1053,6 +1060,7 @@ setMethod( logfile = logfile, types = types, support = support, + types_src = types_src, verbose = if (progress) FALSE else verbose )[, "doc" := docname] } @@ -1094,6 +1102,7 @@ setMethod( logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), expand_to_token = FALSE, drop_inexact_annotations = TRUE, verbose = if (progress) FALSE else verbose, @@ -1198,6 +1207,7 @@ setMethod( logfile = logfile, types = types, support = support, + types_src = types_src, verbose = verbose ) diff --git a/man/entity_types_map.Rd b/man/entity_types_map.Rd index 3c704dc..f967519 100644 --- a/man/entity_types_map.Rd +++ b/man/entity_types_map.Rd @@ -54,7 +54,7 @@ library(quanteda) inaugural_paragraphs <- data_corpus_inaugural \%>\% corpus_subset(Year == 2009) \%>\% # limit to Barack Obama 2009 corpus_reshape(to = "paragraphs") - + uritab_paragraphs <- get_dbpedia_uris( x = inaugural_paragraphs[2], # single paragraph language = "en", diff --git a/man/get_dbpedia_uris.Rd b/man/get_dbpedia_uris.Rd index 0defd7c..73e3e47 100644 --- a/man/get_dbpedia_uris.Rd +++ b/man/get_dbpedia_uris.Rd @@ -42,6 +42,7 @@ get_dbpedia_uris(x, ...) doc_id = NA_character_, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), verbose = TRUE ) @@ -58,6 +59,7 @@ get_dbpedia_uris(x, ...) logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), expand_to_token = FALSE, drop_inexact_annotations = TRUE, verbose = TRUE @@ -74,6 +76,7 @@ get_dbpedia_uris(x, ...) logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), max_len = 7990L, overlap = 1000L, expand_to_token = FALSE, @@ -92,6 +95,7 @@ get_dbpedia_uris(x, ...) logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), verbose = TRUE, progress = FALSE ) @@ -111,6 +115,7 @@ get_dbpedia_uris(x, ...) logfile = NULL, types = character(), support = 20, + types_src = c("DBpedia", "Wikidata"), expand_to_token = FALSE, drop_inexact_annotations = TRUE, verbose = if (progress) FALSE else verbose,