R version 4.5.0 beta (2025-03-27 r88065 ucrt) -- "How About a Twenty-Six" Copyright (C) 2025 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > library(tm) Loading required package: NLP > library(tm.plugin.lexisnexis) > > # English example > file <- system.file("texts", "lexisnexis_test_en.html", + package = "tm.plugin.lexisnexis") > corpus <- Corpus(LexisNexisSource(file)) > > # French example > file <- system.file("texts", "lexisnexis_test_fr.html", + package = "tm.plugin.lexisnexis") > corpus <- Corpus(LexisNexisSource(file)) > > # Two malformed examples: one which can be parsed but with a missing copyright > # notice (and with a warning), and one which should be dropped (with a warning). > # We suppress warnings to avoid breaking the build, then test the consequences. > file <- system.file("texts", "lexisnexis_test_copyright_error.html", + package = "tm.plugin.lexisnexis") > corpus <- suppressWarnings(Corpus(LexisNexisSource(file))) > stopifnot(length(corpus) == 1, + corpus[[1]]$meta$id == "resize201812311", + length(corpus[[1]]$meta$rights) == 0) > > proc.time() user system elapsed 0.43 0.07 0.50