SCM

SCM Repository

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

Diff of /pkg/R/matrix.R

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

revision 1552, Sun Jan 20 08:30:29 2019 UTC revision 1553, Tue Jan 22 07:27:03 2019 UTC
# Line 123  Line 123 
123      ## significant overhead (as SnowballC does not export its internal C      ## significant overhead (as SnowballC does not export its internal C
124      ## functions).      ## functions).
125      ##      ##
126      ## Stemming afterwards is still quite performant as we already have all      ## Stemming afterwards is still quite performant as we already have
127      ## terms. However, there is some overhead involved as we need to recheck      ## all terms.  However, there is some overhead involved as we need
128      ## local bounds and word lengths.      ## to recheck local bounds and word lengths.
129      ## </NOTE>      ## </NOTE>
130      if (isTRUE(control$stemming)) {      if (isTRUE(control$stemming)) {
131          stems <- as.factor(SnowballC::wordStem(m$dimnames$Terms,          stems <- SnowballC::wordStem(m$dimnames$Terms,
132                                                 meta(x, "language")))                                       meta(x, "language"))
133            ## Do as.factor(stems) "by hand" for performance reasons.
134            uniqs <- sort(unique(stems))
135            stems <- match(stems, uniqs)
136            attributes(stems) <- list(levels = uniqs, class = "factor")
137          m <- rollup(m, "Terms", stems)          m <- rollup(m, "Terms", stems)
138    
139          ## Recheck local bounds          ## Recheck local bounds

Legend:
Removed from v.1552  
changed lines
  Added in v.1553

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