Discuss Scratch

Chiroyce
Scratcher
1000+ posts

Help with markovify

I installed markovify, and I ran the demo code

import markovify
# Get raw text as string.
with open("data.txt") as f:
    text = f.read()
# Build the model.
text_model = markovify.Text(text)
# Print five randomly-generated sentences
for i in range(5):
    print(text_model.make_sentence())
# Print three randomly-generated sentences of no more than 280 characters
for i in range(3):
    print(text_model.make_short_sentence(280))
My data.txt file contains
Hello, World!
and when I run it, I only get this








April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Chiroyce
Scratcher
1000+ posts

Help with markovify

bump







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Jeffalo
Scratcher
1000+ posts

Help with markovify

you might have some luck with asking the developers, they probably know how to fix it

disclaimer: sometimes my posts are pretty critical of the scratch team (especially my older ones), but i really do scratch & scratch team. jvvg made a short essay thing about the scratch team, which is a pretty good read, if you want a different perspective for the scratch team's actions.

my website: jeffalo.net | ocular: scratch forum search













Chiroyce
Scratcher
1000+ posts

Help with markovify

Jeffalo wrote:

you might have some luck with asking the developers, they probably know how to fix it
welp i dont have a github account yet







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
kccuber
Scratcher
1000+ posts

Help with markovify

Chiroyce wrote:

Jeffalo wrote:

you might have some luck with asking the developers, they probably know how to fix it
welp i dont have a github account yet
go make one then, trust me it makes life easier


Made using Nord Theme & Inkscape
CST1229
Scratcher
1000+ posts

Help with markovify

kccuber wrote:

Chiroyce wrote:

Jeffalo wrote:

you might have some luck with asking the developers, they probably know how to fix it
welp i dont have a github account yet
go make one then, trust me it makes life easier
[offtopic]and also allows you to contribute to nono word and scratch[/offtopic]

This is a signature. It's a piece of text that appears below every post I write. Click here to learn more, including how to make your own.
RIP assets image hosting. 2013?-2023



god286
Scratcher
1000+ posts

Help with markovify

You just need to have a big dataset, like maybe with 30-40 entries at least.

Here are some of my followers!

I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
Chiroyce
Scratcher
1000+ posts

Help with markovify

god286 wrote:

You just need to have a big dataset, like maybe with 30-40 entries at least.
let me try that …







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
Chiroyce
Scratcher
1000+ posts

Help with markovify

Yeah I just set my data.txt file to the names of 100-200 projects on trending
LbR Character Profiles9rainbowtails, Arctic 5 #Games #Games #Games #Games #Games #Games #Games #All #All #All #All #All #All #Allsmallnoseman, Back Again 4 || Platformer #all #games #art #music-canCode-, Rainy Night (Mobile Friendly) | Platformer | #GamesOrigamiCrane-, - Jungle Rescue 3 - | Collab with @Rayhan-z | #all #games #art #storiesThePro255, 1-0 ⚘ templateCapitanFluffy, ART DUMP CUS ✨CLOUT✨GameGirlX, Arctic 4 #Games #Games #Games #Games #All #All #Allsmallnoseman, OPEN - 1k+ Aquarium Collab OTA (15 designs!)Doublefool, resonate ⚘ collabCapitanFluffy, Arctic 6 #Games #Games #Games #Games #Games #Games #Games #Games #All #All #All #All #All #Allsmallnoseman, Waterfall Plains v1.1 online SERVER 2Titanium01, Elfed - Holiday Adventure [old project]h0rnet15, -TIN- | Intro-savior-, HOLIDAY DTA - OPENSilverpelt_, emotions. [reshare]Aussie_Owl, No Jump!!!! | Platformer | #All #Gamesx_PlatformMaker_x, ello m8Pikoki--, Sky Climber!!! #games #all #ladder #dodge #mobileSantabike, Among Us Platformer 6 | #games #allDEFAULTDANCEONEM, ✨Trampoline ✨ completed ToPH AU MAPChipotlTurtle, FNF - charting testvollrineVPS1, Pizza Clicker! #games #all #pizzaTrentonTNT, Neon || 360° Platformer #games #art #generic?? #rageworthyMysticCr8tor, Sunshine | Platformer 3 #gamesHenryWolfe, Yourflez cannot find his OreosYourflez, Paper Animations :oFUZZIE-WEASEL, Spring | Platformer #All #Games #SpringAndrewTanYuHo, Fruit Frenzyㅤ#gamesxamuil2, Cyan | #Art #Games #GenericMysticCr8tor, Comment Animations-SuperFunnyAnimator-, Lightningbug Rabbit - Chapter 9 - Opal9rainbowtails, Into The Unknown - a platformer-SamScratch-, Dexter 2011-2021 RIPConureConjure, Huggy Wuggy Simulator (WARNING : Disturbing Character)rayyaka, Average secondary school day animation | part 2lisabc, ➳ Light - Chapter 10daisykitty, crystal theme songs part 8SkittlesTheBunny, Christmas Rush | #Games #All #Trending #Art #Stories #Christmas #Musicmadrid2030, Super Mario On Scratch 5 #gamesicey-creamy, Elements 2 | A platformer #all #games #art #platformer #trendingWorkshopX, MYM Xmas SpecialCastle_Hippopotamus, Stranded Lullaby || AMVOmbraTheFurry2, Mr. Roger cap's adventure!#puzzle#game#allTEJASJAKKA27, :: aesthetic gdocs notes tutorial ↘Bubble-Frog, The Amazing Spider Cat: Chapter 18LinkScratchStar, HEY KIDS . dtaeinfynity_, Friday night funkin' Team seasvollrineVPS1, birdwatching . animated art pieceinfynity_, スライム大戦争[モバイル対応]hgwrs16, Super Mario On Scratch 6 #gamesicey-creamy, Intro for Portishead7 (Duel)Quimexus, Relaxation 4nexo0804, exposing pogsona... >:(infynity_, inko's art dump no.1doodleblues, Back Again 3 || Platformer #all #games #art #music-canCode-, Dream Sweet In Sea Major || AMVOmbraTheFurry2, home . stress reliefinfynity_, ❄️ Christmas DTA ❄️-Whisperwing-, Space Runner #All #All #All #All #Games #Games #Gamesradscience, ➣ 1.2k Rotating DTAGlorytheAlphaWolf, [CONTEST] Super Mario Game Contest 2!Brad-Games, Friday night funkin' High Effort Pibby Corruption-Steven UniversevollrineVPS1, Intro -wall-duxx, FNF BOSSRUSH WEEK 1vollrineVPS1, Interstate UnleashedBRODUDECOOLGUY, DTLegendz OSDylanTheXD, Tai's BreweryArcanisHD, Cube Dash #All #Games #ArtManGold-0658, Red Ball - Puzzle PlatformerThe-Green-Dragon, Run AwayFaxxton, THE BAD GUY • 8fib1123meow, Life of Dumbpaw and Smartpaw Chapter 13500-cats, Santa's Adventure#All#Games#Games#Gameskingoftheglory24, ☆ 1K DTA ☆Aussie_Owl, ➼ Trembling Roots ➼ Light Up The Dark ➼ Ch. 29 ➼ShadeSwirl, 600 // Intro Template! #template #all #trendingQuimexus, Improved Ship Art DumpSilverPUP788, Arctic 3 A 1000 Follower Special #Games #Games #Games #Games #All #All #All #Allsmallnoseman, exposing infynity_Pogsona, SCRATCHJUMP V1.1 [#ALL #GAMES]maDU59_, My Notebook 2 [ A Mobile Friendly Platformer ]ManGold-0658, ➣ Icon Batch #1GlorytheAlphaWolf, |⠀Intro for @-TIN- [ENTRY]portishead7, Water Platformer (This kind of clock has to be Stopped)Evani_2, Intro Entry » King-Kapibarapizzarush, Some Cookies | Mini Art DumpGlitch-Tech, Part 4xX_TIG_Xx, When I Play Too Much Minecraft... #All #Animations #Art #Stories #Music #GamesTeachMeToHowl, Faker | Saturday Night Scratchin' fan conceptItsJamii, [TEST] Tile Jump 3Dicmy123, Ocean - A Platformer #All #games #art #trending #platformer #ocean #teamseasmfyy, The Fall of the Clans Ch. 7zooIights, Golf | #All #Animations #Art #Games #Music #Stories #Tutorials #EntryKwik_Coder, Clean water clickerCrystal_kitty8891, exposing pogsona #2infynity_, Christmas || A platformer || #games #all #trending #music #art #animations #storieshern1, Mini Art flump with actual quality??? :000SkittlesTheBunny, (Idea) Global custom blockggenije, Best Friends | 3k+ CRK ArtGlitch-Tech, 
and I still get


I also tried multiple lines in the file and it still doesn't work.

Last edited by Chiroyce (Dec. 7, 2021 16:06:53)








April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence
god286
Scratcher
1000+ posts

Help with markovify

Chiroyce wrote:

I also tried multiple lines in the file and it still doesn't work.
Did you use the NewlineText model instead of the Text model for that?
Also, the ones that are in a single line need a
.
at the end of each text.

Here are some of my followers!

I joined: 5 years, 9 months, 24 days ago (31/03/2018)
I have: 479 followers
In total, I have attained: 1,403 loves, 1,145 favourites, and 33,731 views.
Fun Fact: If my account continued to gain followers at a similar rate to right now, in 14,210 years I would reach the number of followers griffpatch has today! Try to imagine how many followers he would have then!
Thank you everyone!
Script created by god286.
Chiroyce
Scratcher
1000+ posts

Help with markovify

god286 wrote:

Chiroyce wrote:

I also tried multiple lines in the file and it still doesn't work.
Did you use the NewlineText model instead of the Text model for that?
Also, the ones that are in a single line need a
.
at the end of each text.
THANKS!! It works now







April Fools' topics:
New Buildings in Scratch's headquarters
Give every Scratcher an M1 MacBook Air
Scratch should let users edit other Scratchers' projects
Make a statue for Jeffalo
Scratch Tech Tips™
Make a Chiroyce statue emoji


<img src=“x” onerror=“alert('XSS vulnerability discovered')”>

this is a test sentence

Powered by DjangoBB