[codeface] [PATCH 1/3] Add content_transformer

  • From: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
  • To: codeface@xxxxxxxxxxxxx
  • Date: Fri, 2 Oct 2015 10:46:06 +0200

Signed-off-by: Mitchell Joblin <mitchell.joblin.ext@xxxxxxxxxxx>
---
pkg/R/makeforest.r | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pkg/R/makeforest.r b/pkg/R/makeforest.r
index 31de0a6..0f66812 100644
--- a/pkg/R/makeforest.r
+++ b/pkg/R/makeforest.r
@@ -52,7 +52,7 @@ gen.corpus <- function (ml, repo.path="./", suffix=".txt",
outdir=NULL,
}
corp.orig <- corp

- corp <- tm_map(corp, function(x) iconv(enc2utf8(x), sub="byte"))
+ corp <- tm_map(corp, content_transformer(function(x) iconv(enc2utf8(x),
sub="byte")))
corp <- tm_map(corp, tm.plugin.mail::removeCitation, removeQuoteHeader=T)
corp <- tm_map(corp, tm.plugin.mail::removeSignature, marks=marks)
corp <- tm_map(corp, tm.plugin.mail::removeMultipart)
--
2.1.4


Other related posts:

  • » [codeface] [PATCH 1/3] Add content_transformer - Mitchell Joblin