AdamSpannbauer / lexRankr

Extractive Text Summariztion with lexRankr (an R package implementing the LexRank algorithm)
Other
21 stars 4 forks source link

throw more informative error if only 1 document passed #21

Open AdamSpannbauer opened 5 years ago

AdamSpannbauer commented 5 years ago

put a stopifnot(length(text) > 1) in the best place

currently inputting 1 doc throws exception below, which isnt too helpful to uncover the actual issue

Only one sentence had nonzero tfidf scores.  Similarities would return as NaN