gentext chung text generation based on SORT algorythm

User projects written in or related to FreeBASIC.
Post Reply
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

gentext chung text generation based on SORT algorythm

Post by chung »

gentext chung is a small text generator based on SORT algorythm (inspired from neural networks and Markov chains but not at all the same) .Trained with an input text file , it can generate variants text in response to user input or freely (user enters empty input). Written in easy fast compiled freebasic.

=> https://chungswebsite.blogspot.com/2019 ... ed-on.html
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by jj2007 »

Looks interesting but when I try to build gentext_chung.bas I get loads of errors, for GAS, Gcc32 and Gcc64:

Code: Select all

gentext_chung\tmp\TmpFb.bas(203) error 24: Invalid data types
gentext_chung\tmp\TmpFb.bas(205) error 20: Type mismatch
gentext_chung\tmp\TmpFb.bas(207) error 57: Type mismatch, at parameter 2 (controltext) of PRINTGUI()
gentext_chung\tmp\TmpFb.bas(257) error 20: Type mismatch
gentext_chung\tmp\TmpFb.bas(260) error 20: Type mismatch
gentext_chung\tmp\TmpFb.bas(262) error 20: Type mismatch
gentext_chung\tmp\TmpFb.bas(264) error 57: Type mismatch, at parameter 2 (controltext) of PRINTGUI()
gentext_chung\tmp\TmpFb.bas(421) error 24: Invalid data types, before ','
gentext_chung\tmp\TmpFb.bas(428) error 180: Invalid assignment/conversion
gentext_chung\tmp\TmpFb.bas(430) error 20: Type mismatch
gentext_chung\tmp\TmpFb.bas(430) error 132: Too many errors, exiting
Lines 203...207:

Code: Select all

Var msg=Str(iword)+" "
For i=1 To 80
	msg+=mywords(i)+" "
Next
printgui("win.text2",msg)
How does a typical generated text look like?
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

i use fbedit + freebasic 1.05 win32

the program is loaded with a small sample of poetry but you can load larger files with any language. i tried it with 180000 words extracted ffrom cornell movie_lines.txt conversations then it looks llike a chatbot.

(31/03/2019) new fast SORT load algorythm added (20 x faster)
Last edited by chung on Apr 04, 2019 7:09, edited 1 time in total.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(02/04/2019) TTS speak (defalult,english,francais,german,off) added , + load/reload buttons
+posted some ansi txt files+RANK files for instant load (see sourceforge TEXT folder text.zip)

(04/04/2019) autoOn/Off stream mode added
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(19/04/2019) Lcase/Ucase caps sort bug corrected
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(26/04/2019) i have added to brainpiano3 of midipiano_chung save as miditext txt files from imported midifiles (save with [A]noautochord selected)

then when loaded these txt files gentext_chung generates mid music sent to the default midi mapper port instead of speach .

new video => https://www.youtube.com/watch?v=egfXspTBeJII

virtual tchaiko => https://www.youtube.com/watch?v=NCF05ivZUEk

virtual bill evans => https://www.youtube.com/watch?v=cDDf7f7ToI0

virtual carpenters => https://youtu.be/qC56waG52fE
Last edited by chung on May 02, 2019 14:59, edited 1 time in total.
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(02/05/2019) many bugs corrections + new look
Tourist Trap
Posts: 2958
Joined: Jun 02, 2015 16:24

Re: gentext chung text generation based on SORT algorythm

Post by Tourist Trap »

chung wrote:(02/05/2019) many bugs corrections + new look
Looking at your video virtual_carpenter, I can't figure out what all of this does. It looks like a hex file, then it picks randomly some data from it?
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

its not the carpenters you hear but my program generating random music as coded text in the style of the carpenters from midi data transcribed to text
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: gentext chung text generation based on SORT algorythm

Post by paul doe »

Interesting. There's so little about PCG in this forum... might try to address that soon ;)
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: gentext chung text generation based on SORT algorythm

Post by MrSwiss »

Well, for PGC, there is:
pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )
from myself ... to start off, with (a header only, implementation).
paul doe
Moderator
Posts: 1730
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: gentext chung text generation based on SORT algorythm

Post by paul doe »

MrSwiss wrote:Well, for PGC, there is:
pcg32rr.bi - minimal PCG32_random_r implementation ( (c) Melissa E. O'Neill )
from myself ... to start off, with (a header only, implementation).
Yes, while there are good implementations of PRNGs (and they are instrumental for generating solid random content), I was talking about the algorithms that generate content using those PRNGs, not the PRNGs themselves. I've yet to see, for example, a procedural modeler/texture generator. There has been some basic texture generation using Perlin Noise, but that's it...
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(10/05/2019) genmidi_chung midi only version with notes variations instead of absolute values (pitch independant)

(16/05/2019) genmidi_chung_dll library dll version of genmidi_chung added
chung
Posts: 648
Joined: Jan 16, 2010 20:52
Location: France
Contact:

Re: gentext chung text generation based on SORT algorythm

Post by chung »

(09/08/2019) added new version genmidi2_chung genmidi2 of genmidi_chung with sort on melody , chords data are only used when playing notes
Post Reply