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 693, Fri Dec 22 13:21:30 2006 UTC revision 694, Sun Dec 31 14:47:46 2006 UTC
# Line 1  Line 1 
1  # Author: Ingo Feinerer  # Author: Ingo Feinerer
2    
3  # The "..." are additional arguments for the function_generator parser  # The "..." are additional arguments for the function_generator parser
4  setGeneric("TextDocCol", function(object, parser = read_plain, ...) standardGeneric("TextDocCol"))  setGeneric("TextDocCol", function(object, parser = read_plain, load = FALSE, ...) standardGeneric("TextDocCol"))
5  setMethod("TextDocCol",  setMethod("TextDocCol",
6            signature(object = "Source"),            signature(object = "Source"),
7            function(object, parser = read_plain, ...) {            function(object, parser = read_plain, load = FALSE, ...) {
8                if (inherits(parser, "function_generator"))                if (inherits(parser, "function_generator"))
9                    parser <- parser(...)                    parser <- parser(...)
10    
# Line 15  Line 15 
15                    elem <- get_elem(object)                    elem <- get_elem(object)
16                    # If there is no Load on Demand support                    # If there is no Load on Demand support
17                    # we need to load the corpus into memory at startup                    # we need to load the corpus into memory at startup
18                    if (object@LoDSupport)                    if (!object@LoDSupport)
                       load <- object@Load  
                   else  
19                        load <- TRUE                        load <- TRUE
20                    tdl <- c(tdl, list(parser(elem, object@LoDSupport, load, as.character(counter))))                    tdl <- c(tdl, list(parser(elem, load, as.character(counter))))
21                    counter <- counter + 1                    counter <- counter + 1
22                }                }
23    
# Line 503  Line 501 
501            function(object) {            function(object) {
502                summary(object)                summary(object)
503                cat("\n")                cat("\n")
504                show(as(object, "list"))                show(object@.Data)
505            })            })
506    
507  # No metadata is checked  # No metadata is checked

Legend:
Removed from v.693  
changed lines
  Added in v.694

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