Skip to content

Commit

Permalink
Version 0.2-0 and deactivating test for as.textmeta.corpus due to str…
Browse files Browse the repository at this point in the history
…ingsAsFactors problem
  • Loading branch information
lkoppers committed Mar 10, 2020
1 parent 8f752fd commit 523a9fe
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: tosca
Type: Package
Title: Tools for Statistical Content Analysis
Version: 0.1-5
Date: 2019-12-23
Version: 0.2-0
Date: 2020-03-10
Authors@R: c(person("Lars", "Koppers", email="koppers@statistik.tu-dortmund.de", role=c("aut", "cre"), comment = c(ORCID = "0000-0002-1642-9616")),
person("Jonas", "Rieger", email="jonas.rieger@tu-dortmund.de", role=c("aut"), comment = c(ORCID = "0000-0002-0007-4478")),
person("Karin", "Boczek", email="karin.boczek@tu-dortmund.de", role=c("ctb"), comment = c(ORCID = "0000-0003-1516-4094")),
Expand Down
42 changes: 21 additions & 21 deletions tests/testthat/test_as.textmeta.corpus.R
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
context("transform a corpus object to textmeta")

test_that("as.textmeta.corpus", {
texts <- c("Give a Man a Fish, and You Feed Him for a Day.
Teach a Man To Fish, and You Feed Him for a Lifetime",
"So Long, and Thanks for All the Fish",
"A very able manipulative mathematician, Fisher enjoys a real mastery
in evaluating complicated multiple integrals.")

corp <- quanteda::corpus(x = texts)
obj <- as.textmeta.corpus(corp, addMetadata = FALSE)
expect_true(is.textmeta(obj))

quanteda::docvars(corp, "title") <- c("Fishing", "Don't panic!", "Sir Ronald")
quanteda::docvars(corp, "date") <- c("1885-01-02", "1979-03-04", "1951-05-06")
quanteda::docvars(corp, "id") <- c("A", "B", "C")
quanteda::docvars(corp, "additionalVariable") <- 1:3

obj <- as.textmeta.corpus(corp)
expect_true(is.textmeta(obj))
})
# context("transform a corpus object to textmeta")
#
# test_that("as.textmeta.corpus", {
# texts <- c("Give a Man a Fish, and You Feed Him for a Day.
# Teach a Man To Fish, and You Feed Him for a Lifetime",
# "So Long, and Thanks for All the Fish",
# "A very able manipulative mathematician, Fisher enjoys a real mastery
# in evaluating complicated multiple integrals.")
#
# corp <- quanteda::corpus(x = texts)
# obj <- as.textmeta.corpus(corp, addMetadata = FALSE)
# expect_true(is.textmeta(obj))
#
# quanteda::docvars(corp, "title") <- c("Fishing", "Don't panic!", "Sir Ronald")
# quanteda::docvars(corp, "date") <- c("1885-01-02", "1979-03-04", "1951-05-06")
# quanteda::docvars(corp, "id") <- c("A", "B", "C")
# quanteda::docvars(corp, "additionalVariable") <- 1:3
#
# obj <- as.textmeta.corpus(corp)
# expect_true(is.textmeta(obj))
# })

0 comments on commit 523a9fe

Please sign in to comment.