Comments (2)
The call you show above is attempting to use the entire contents of df$contentraw
and produce a single summary sentence from all the text in the column. As shown in the error, working with a large corpus is very memory intensive and depending on the input size, your system may not be able to handle it.
If you are trying to run the lexRank
process on one url
at a time you will need to iterate over the urls yourself or use something such as data.table
's by
operator (example below). This is less likely to run into the memory issues you experienced.
library(data.table)
dt = data.table(contentraw = c('This is a test sentence. Second sentence. Test sentence again.',
'This is another document. More words. More document words.',
'Last doc. More text doc. Third sentence.'),
url = 1:3)
dt[, lexRankr::lexRank(contentraw,
docId = url,
n = 1,
continuous = FALSE,
returnTies = FALSE),
by = url]
# url docId sentenceId sentence value
# 1: 1 1 1_1 This is a test sentence. 0.3333333
# 2: 2 2 2_3 More document words. 0.4864865
# 3: 3 3 3_1 Last doc. 0.5000000
from lexrankr.
Many thanks - was trying lapply and ran into similar. Appreciate it!
from lexrankr.
Related Issues (14)
- proxyDB error: IDFcosine already in registry HOT 1
- eval data.table
- Error in sentenceSimil HOT 4
- create doc id arg for unnest sentence function HOT 1
- `smart_stopwords` object not available unless package loaded with `library`
- `damping` arg ignored in `lexRankFromSimil` HOT 5
- Not able to get single top sentence HOT 1
- no sentences above threshold needs verbose error HOT 3
- throw more informative error if only 1 document passed
- Test failure on i386 HOT 1
- rm dplyr HOT 3
- Purr HOT 10
- add helper for multiple doc lexranking (within doc)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lexrankr.