0

I installed Rita through Node, following a RiTa.js egghead.io tutorial. After running the following code in my rita.js file on terminal, it shows a lot of data and says

Error: No valid sentence-starts remaining

var rita= require('rita');

var inputText= 'The blue bus drove by a crowded street. All the children were singing. It was a great bus ride.';

var markov= new rita.markov(5)

markov.addText(inputText)

var sentences= markov.generate(2);

console.log(sentences)
vimuth
  • 5,064
  • 33
  • 79
  • 116
Idamara
  • 1
  • 2
  • The code in [the official documentation](https://rednoise.org/rita/reference/RiTa/markov/index.html) produces that result too. – Andy Aug 15 '22 at 15:36
  • You may want to [log an issue](https://github.com/dhowe/ritajs/issues). – Andy Aug 15 '22 at 15:43

1 Answers1

2

You just need to modify the markov input to '2' (limit) and it'll work. Here's the example running: https://notebook.xbdev.net/index.php?page=ritalanguage2&

Ben
  • 21
  • 4
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/33144360) – kelsny Nov 14 '22 at 20:21