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



| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


Chiroyce
Scratcher
1000+ posts

Help with markovify

bump


| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


Jeffalo
Scratcher
1000+ posts

Help with markovify

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

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


| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


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 text that appears below each post I write. Click here to make your own. And use Shift+Down to see more if you're on Chrome.

New nono word 3.0 forums theme is very epic
Stuff I made
All emojis usable in the forums and in comments

⌚️⏰⏱️⏲️⌨️☎️⌛️⚖️⚙️✉️✂️✒️☂️✏️☕️♟️⚰️⚱️⛏️⚔️⚒️⛓️⚗️⛑️
⭐️✨⚡️☄️☀️⛅️☁️⛈️⛄️❄️☔️☘️
☹️✌️☝️✍️✋☺️
⚽️⚾️⛳️⛹️⛷️⛸️
✈️⛵️Ⓜ️⚓️⛽️⛲️⛺️⛪️⛰️⛱️⛴️⛩️♨️
❗️❕❓❔©️®️‼️⁉️™️➕➖➗✖️⛔⭕❌✔️〰️〽️⚠️
☑️✅❎▶️⏩⏪⏫⏬ℹ️⏭️⏮️⏯️⏏️◀️➡️⬅️⬆️⬇️↗️↘️↙️↖️↪️↩️⤴️⤵️✳️✴️❇️㊗️㊙️
⚕️☦️♾️⚛️⛎️✝️☪️☮️☯️☸️♈️♉️♊️♋️♌️♍️♎️♏️♐️♑️♒️♓️
❤️❣️♠️♣️♥️♦️♀️♂️♻️☢️☣️⚜️➰️➿️☠️
⬛️⬜️⚪️⚫️▪️▫️◻️◼️◽️

Copy-paste as you wish! No credit needed.
Some assets for use in posts
Globe button
[img]https://cdn.scratch.mit.edu/scratchr2/static/__73c73bf495827f55759847fac6191e53__//djangobb_forum/img/browser-os.png[/img]
god286
Scratcher
1000+ posts

Help with markovify

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




                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet


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 …


| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


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)



| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


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.




                 _ ____  ___   __   
__ _ ___ __| |___ \( _ ) / /_
/ _` |/ _ \ / _` | __) / _ \| '_ \
| (_| | (_) | (_| |/ __/ (_) | (_) |
\__, |\___/ \__,_|_____\___/ \___/
|___/
^ inspired by @Chiroyce, made with figlet


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


| Boy | 13 | Python | ATer |  Tech | Cars | Procrastinator | Forums | Cricket | ☁️ Cloud |

5fdb2e83ca5a134289edeb294044abb23578eeb6d0d851cca9dd976b38ec6508


I FOUND IT!!! https://scratch.mit.edu/adminpanel/adminpanel.png


Powered by DjangoBB

Standard | Mobile