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 747, Fri Apr 27 18:16:53 2007 UTC revision 755, Sun Jun 3 17:20:40 2007 UTC
# Line 222  Line 222 
222                return(object)                return(object)
223            })            })
224    
225    setGeneric("replaceWords", function(object, words, by, ...) standardGeneric("replaceWords"))
226    setMethod("replaceWords",
227              signature(object = "PlainTextDocument", words = "character", by = "character"),
228              function(object, words, by, ...) {
229                  pattern <- paste(words, collapse = "|")
230                  Corpus(object) <- gsub(pattern, by, Corpus(object))
231                  return(object)
232              })
233    
234  setGeneric("tmFilter", function(object, ..., FUN = sFilter, doclevel = FALSE) standardGeneric("tmFilter"))  setGeneric("tmFilter", function(object, ..., FUN = sFilter, doclevel = FALSE) standardGeneric("tmFilter"))
235  setMethod("tmFilter",  setMethod("tmFilter",
236            signature(object = "TextDocCol"),            signature(object = "TextDocCol"),

Legend:
Removed from v.747  
changed lines
  Added in v.755

root@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