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 1383, Thu May 29 07:32:14 2014 UTC revision 1397, Fri Sep 12 19:30:27 2014 UTC
# Line 13  Line 13 
13          stop("error in creating database")          stop("error in creating database")
14      db <- filehash::dbInit(dbControl$dbName, dbControl$dbType)      db <- filehash::dbInit(dbControl$dbName, dbControl$dbType)
15    
16        x <- open(x)
17      tdl <- vector("list", length(x))      tdl <- vector("list", length(x))
18      counter <- 1      counter <- 1
19      while (!eoi(x)) {      while (!eoi(x)) {
# Line 25  Line 26 
26          tdl[[counter]] <- meta(doc, "id")          tdl[[counter]] <- meta(doc, "id")
27          counter <- counter + 1          counter <- counter + 1
28      }      }
29        x <- close(x)
30    
31      structure(list(content = tdl,      structure(list(content = tdl,
32                     meta = CorpusMeta(),                     meta = CorpusMeta(),
# Line 41  Line 43 
43    
44      readerControl <- prepareReader(readerControl, reader(x))      readerControl <- prepareReader(readerControl, reader(x))
45    
46        x <- open(x)
47      tdl <- vector("list", length(x))      tdl <- vector("list", length(x))
48      # Check for parallel element access      # Check for parallel element access
49      if (is.function(getS3method("pGetElem", class(x), TRUE)))      if (is.function(getS3method("pGetElem", class(x), TRUE)))
# Line 61  Line 64 
64              counter <- counter + 1              counter <- counter + 1
65          }          }
66      }      }
67        x <- close(x)
68    
69      structure(list(content = tdl,      structure(list(content = tdl,
70                     meta = CorpusMeta(),                     meta = CorpusMeta(),

Legend:
Removed from v.1383  
changed lines
  Added in v.1397

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