2017 icon indicating copy to clipboard operation
2017 copied to clipboard

Structuralist Random Writing

Open hbarnard opened this issue 7 years ago • 9 comments

I have some very messy Python that:

  • Takes a text and analyses the syntax down to tags, so that there is the 'structure' of the text
  • Strips and store vocabularies of texts
  • Then writes 'prose' using the structure and vocabulary

One can mix and match, use old-fashioned vocabulary with the structure of an academic paper, for example. I've made a first attempt at making the application structure multilingual too. It will do 50K words at the moment. Here is a sample paragraph:

Years come. Each team under an first life began an land but five ran the safe who every baseball flew drove and. It has food outside until the flew as sick all long plants some. Sold a useful rubber above an town because him flew they around us asked farmer but him flew I away us may carry from each truck but. An years bought behind only less bell without up you sent an voice stood so bear top first insects forth told an coast what sent still early onto gray teeth upon us came all their bed inside fun eat us its here right bought live again back invented.

hbarnard avatar Nov 08 '17 15:11 hbarnard

This reminds me of Michael Paulukonis' PortSkyBot ( https://twitter.com/portskybot)

On Wed, Nov 8, 2017 at 10:51 AM Hugh Barnard [email protected] wrote:

I have some very messy Python that:

    1. Takes a text and analysis the syntax down to tags, so that there is the 'structure' of the text
    1. Strips and store vocabularies of texts
    1. Then writes 'prose' using the structure and vocabulary

One can mix and match, use old-fashioned vocabulary with the structure of an academic paper, for example. I've made a first attempt at making the application structure multilingual too. It will do 50K words at the moment. Here is a sample paragraph:

Years come. Each team under an first life began an land but five ran the safe who every baseball flew drove and. It has food outside until the flew as sick all long plants some. Sold a useful rubber above an town because him flew they around us asked farmer but him flew I away us may carry from each truck but. An years bought behind only less bell without up you sent an voice stood so bear top first insects forth told an coast what sent still early onto gray teeth upon us came all their bed inside fun eat us its here right bought live again back invented.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/NaNoGenMo/2017/issues/93, or mute the thread https://github.com/notifications/unsubscribe-auth/AAd6GY4-3_InHPW0WTBt_MXySP2F1Z2Pks5s0c3ngaJpZM4QWmFC .

enkiv2 avatar Nov 08 '17 15:11 enkiv2

Thanks, now have a repository of rather sh** code at https://github.com/hbarnard/nanogenmo-2017. There's an example generated story in en/stories. I will write some minimal documentation in the next couple of days too.

hbarnard avatar Nov 09 '17 14:11 hbarnard

curl https://raw.githubusercontent.com/hbarnard/nanogenmo-2017/master/en/stories/test12017-11-09-14-13-30.txt | wc -w gives 29,685 words. Can you get it to 50k?

hugovk avatar Nov 09 '17 14:11 hugovk

Hi Hugo, Yes certainly, however there would be some 'non-artistic' (haha) repetition since I would just increase loop count, for example. So I can have it to 50K by the end of the month, but I'd like to do that via an 'improved' version (actual nearly anything is an improvement at this stage). Best Hugh

hbarnard avatar Nov 09 '17 15:11 hbarnard

Good stuff, plenty of time to go!

hugovk avatar Nov 09 '17 16:11 hugovk

I am now at 51k and working on 'improvements' and a little bit of doc. The API doc for textblob (main tool used) is already in the doc folder.

hbarnard avatar Nov 10 '17 17:11 hbarnard

Ok have now upgraded the parsing part to use spacy instead of TextBlob. There's a pretty good README and a test story in en/stories. I think I'm done, because I'm busy now. I had fun

hbarnard avatar Nov 27 '17 18:11 hbarnard

Great! Have a "completed" label!

hugovk avatar Nov 27 '17 21:11 hugovk

Thanks Hugo, was fun to do, if a bit thin (wasn't aware of it until very late) on my part. Next year I'll try and persuade some of computer science students in Birkbeck to take a bash at it, too. Best regards Hugh

On 27 November 2017 at 21:55, Hugo [email protected] wrote:

Great! Have a "completed" label!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NaNoGenMo/2017/issues/93#issuecomment-347341498, or mute the thread https://github.com/notifications/unsubscribe-auth/AAWPw9-l58ydWEDfjmXnvdKcAVq_oethks5s6y-3gaJpZM4QWmFC .

hbarnard avatar Nov 28 '17 06:11 hbarnard