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 1409, Fri Feb 27 16:10:18 2015 UTC revision 1419, Sat May 2 17:23:47 2015 UTC
# Line 138  Line 138 
138    
139  as.list.PCorpus <- as.list.VCorpus <-  as.list.PCorpus <- as.list.VCorpus <-
140  function(x, ...)  function(x, ...)
141      content(x)      setNames(content(x), as.character(lapply(content(x), meta, "id")))
142    
143  as.VCorpus <-  as.VCorpus <-
144  function(x)  function(x)
# Line 229  Line 229 
229      x      x
230  }  }
231    
232  print.PCorpus <- print.VCorpus <-  format.PCorpus <- format.VCorpus <-
233  function(x, ...)  function(x, ...)
234  {  {
235      writeLines(sprintf("<<%s (documents: %d, metadata (corpus/indexed): %d/%d)>>",      c(sprintf("<<%s>>", class(x)[1L]),
236                         class(x)[1],        sprintf("Metadata:  corpus specific: %d, document level (indexed): %d",
                        length(x),  
237                         length(meta(x, type = "corpus")),                         length(meta(x, type = "corpus")),
238                         ncol(meta(x, type = "indexed"))))                ncol(meta(x, type = "indexed"))),
239      invisible(x)        sprintf("Content:  documents: %d", length(x)))
240  }  }
241    
242  writeCorpus <-  writeCorpus <-

Legend:
Removed from v.1409  
changed lines
  Added in v.1419

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge