Easy Markov Chain Text Generation10 Credit Royalty
Easily generate sentences from a large string of text using Markov Chains.
API Calls - 547 Avg call duration - N/A
The Algorithm Platform License is the set of terms that are stated in the Software License section of the Algorithmia Application Developer and API License Agreement. It is intended to allow users to reserve as many rights as possible without limiting Algorithmia's ability to run it as a service. Learn More
Run an Example
"Yet he protested he liked me so well, that he would part with't upon any terms. As my last refuge I got my brother to appear in't."
Install and Use
CLI Install Docs
Install the Algorithmia CLI client by running:
curl -sSLf https://algorithmia.com/install.sh | sh
Then authenticate by running:
$ algo auth # When prompted for api endpoint, hit enter # When prompted for API key, enter your key: YOUR_API_KEY
algo run trivisionzero/MarkovChainTextGeneration/0.1.0 -d '"\"SIR, -There is nothing moves my charity like gratitude; and when a beggar's thankful for a small relief, I always repent it was not more. But seriously, this place will not afford much towards the enlarging of a letter, and I am grown so dull with living in't (for I am not willing to confess that I was always so) as to need all helps. Yet you shall see I will endeavour to satisfy you, upon condition you will tell me why you quarrelled so at your last letter. I cannot guess at it, unless it were that you repented you told me so much of your story, which I am not apt to believe neither, because it would not become our friendship, a great part of it consisting (as I have been taught) in a mutual confidence. And to let you see that I believe it so, I will give you an account of myself, and begin my story, as you did yours, from our parting at Goring House. I came down hither not half so well pleased as I went up, with an engagement upon me that I had little hope of ever shaking off, for I had made use of all the liberty my friends would allow me to preserve my own, and 'twould not do; he was so weary of his, that he would part with't upon any terms. As my last refuge I got my brother to go down with him to see his house, who, when he came back, made the relation I wished. He said the seat was as ill as so good a country would permit, and the house so ruined for want of living in't, as it would ask a good proportion of time and money to make it fit for a woman to confine herself to. This (though it were not much) I was willing to take hold of, and made it considerable enough to break the engagement. I had no quarrel to his person or his fortune, but was in love with neither, and much out of love with a thing called marriage; and have since thanked God I was so, for 'tis not long since one of my brothers writ me word of him that he was killed in a duel, though since I hear that 'twas the other that was killed, and he is fled upon 't, which does not mend the matter much. Both made me glad I had 'scaped him, and sorry for his misfortune, which in earnest was the least return his many civilities to me could deserve. Presently, after this was at an end, my mother died, and I was left at liberty to mourn her loss awhile. At length my aunt (with whom I was when you last saw me) commanded me to wait on her at London; and when I came, she told me how much I was in her care, how well she loved me for my mother's sake, and something for my own, and drew out a long set speech which ended in a good motion (as she called it); and truly I saw no harm in't, for by what I had heard of the gentleman I guessed he expected a better fortune than mine. And it proved so. Yet he protested he liked me so well, that he was very angry my father would not be persuaded to give a \\xa31,000 more with me; and I him so ill, that I vowed if I had \\xa31,000 less I should have thought it too much for him. And so we parted. Since, he has made a story with a new mistress that is worth your knowing, but too long for a letter. I'll keep it for you. After this, some friends that had observed a gravity in my face which might become an elderly man's wife (as they term'd it) and a mother-in-law, proposed a widower to me, that had four daughters, all old enough to be my sisters; but he had a great estate, was as fine a gentleman as ever England bred, and the very pattern of wisdom. I that knew how much I wanted it, thought this the safest place for me to engage in, and was mightily pleased to think I had met with one at last that had wit enough for himself and me too. But shall I tell you what I thought when I knew him (you will say nothing on't): 'twas the vainest, impertinent, self-conceited learned coxcomb that ever yet I saw; to say more were to spoil his marriage, which I hear he is towards with a daughter of my Lord of Coleraine's; but for his sake I shall take heed of a fine gentleman as long as I live. Before I had quite ended with him, coming to town about that and some other occasions of my own, I fell in Sir Thomas's way; and what humour took him I cannot imagine, but he made very formal addresses to me, and engaged his mother and my brother to appear in't. This bred a story pleasanter than any I have told you yet, but so long a one that I must reserve it till we meet, or make it a letter of itself. Only by this you may see 'twas not for nothing he commended me, though to speak seriously, it was because it was to you. Otherwise I might have missed of his praises for we have hardly been cousins since the breaking up of that business. The next thing I desired to be rid on was a scurvy spleen that I had ever been subject to, and to that purpose was advised to drink the waters. There I spent the latter end of the summer, and at my coming home found that a gentleman (who has some estate in this country) had been treating with my brother, and it yet goes on fair and softly. I do not know him so well as to give you much of his character: 'tis a modest, melancholy, reserved man, whose head is so taken up with little philosophical studies, that I admire how I found a room there. 'Twas sure by chance; and unless he is pleased with that part of my humour which other people think worst, 'tis very possible the next new experiment may crowd me out again. Thus you have all my late adventures, and almost as much as this paper will hold. The rest shall be employed in telling you how sorry I am you have got such a cold. I am the more sensible of your trouble by my own, for I have newly got one myself. But I will send you that which used to cure me. 'Tis like the rest of my medicines: if it do no good, 'twill be sure to do no harm, and 'twill be no great trouble to you to eat a little on't now and then; for the taste, as it is not excellent, so 'tis not very ill. One thing more I must tell you, which is that you are not to take it ill that I mistook your age by my computation of your journey through this country; for I was persuaded t'other day that I could not be less than thirty years old by one that believed it himself, because he was sure it was a great while since he had heard of such a one in the world As your humble servant\""' --timeout 300
This algorithm's sample input contains a
'character. This can be used to inject malicious code when running commands (e.g. "'; sudo rm -rf / ;"). Use with caution.