SCM

SCM Repository

[tm] Diff of /pkg/R/corpus.R
ViewVC logotype

Diff of /pkg/R/corpus.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 986, Tue Sep 1 15:33:30 2009 UTC revision 987, Wed Sep 2 17:54:45 2009 UTC
# Line 81  Line 81 
81          list()          list()
82    
83      if (x$Vectorized)      if (x$Vectorized)
84          mapply(function(x, id) readerControl$reader(x, readerControl$language, id),          tdl <- mapply(function(x, id) readerControl$reader(x, readerControl$language, id),
85                 pGetElem(x),                 pGetElem(x),
86                 id = as.character(seq_len(x$Length)),                 id = as.character(seq_len(x$Length)),
87                 SIMPLIFY = FALSE)                 SIMPLIFY = FALSE)
# Line 307  Line 307 
307      print(noquote(lapply(x, identity)))      print(noquote(lapply(x, identity)))
308  }  }
309    
 # No metadata is checked  
 `%IN%` <- function(x, y) UseMethod("%IN%", y)  
 `%IN%.PCorpus` <- function(x, y) {  
     db <- filehash::dbInit(DBControl(y)[["dbName"]], DBControl(y)[["dbType"]])  
     any(unlist(lapply(y, function(x, z) {x %in% Content(z)}, x)))  
 }  
 `%IN%.VCorpus` <- function(x, y) x %in% y  
   
310  lapply.PCorpus <- function(X, FUN, ...) {  lapply.PCorpus <- function(X, FUN, ...) {
311      db <- filehash::dbInit(DBControl(X)[["dbName"]], DBControl(X)[["dbType"]])      db <- filehash::dbInit(DBControl(X)[["dbName"]], DBControl(X)[["dbType"]])
312      lapply(filehash::dbMultiFetch(db, unlist(X)), FUN, ...)      lapply(filehash::dbMultiFetch(db, unlist(X)), FUN, ...)

Legend:
Removed from v.986  
changed lines
  Added in v.987

R-Forge@R-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business University of Wisconsin - Madison Powered By FusionForge