Description Usage Arguments Details Value Examples
detect_sdg
identifies SDGs in text using SDG query systems developed by the Aurora Universities Network, SIRIS Academic, and Elsevier.
1 2 3 4 5 6 7 | detect_sdg(
text,
systems = c("aurora", "siris", "elsevier"),
sdgs = 1:17,
output = c("features", "documents"),
verbose = TRUE
)
|
text |
|
systems |
|
sdgs |
|
output |
|
verbose |
|
detect_sdg
implements three SDG query systems developed by the Arora Universities Network (see aurora_queries
), SIRIS Academic (see siris_queries
), and Elsevier (see elsevier_queries
), and one keyword-based system by Bautista-Puig and Mauleón labeled Ontology (see ontology_queries
). 'detect_sdg' calls dedicated detect_*
for each of the four system. Search of the Lucene-style Boolean queries and the keywords is implemented using the search_features
function from the corpustools
package.
By default, detect_sdg
runs only the three query systems, as they are considerably less liberal than the keyword-based Ontology and therefore likely produce more valid SDG classifications. Users should be aware that systematic validations and comparison between the systems are still largely lacking. Consequently, any results should be interpreted with a high level caution.
The function returns a tibble containing the SDG hits found in the vector of documents. Depending on the value of output
the tibble will contain all or some of the following columns:
Index of the element in text
where match was found. Formatted as a factor with the number of levels matching the original number of documents.
Label of the SDG found in document.
The name of the query system that produced the match.
Index of the query within the query system that produced the match.
Concatenated list of words that caused the query to match.
Index of hit for a given system.
1 2 3 4 5 6 7 8 | # run sdg detection
hits <- detect_sdg(projects)
# run sdg detection with aurora only
hits <- detect_sdg(projects, systems = "aurora")
# run sdg detection for sdg 3 only
hits <- detect_sdg(projects, sdgs = 3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.