Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

print(25,000) I'M IN yes the Python lessons are coming along nicely thanks for asking #15

Open
tullyhansen opened this issue Oct 21, 2014 · 8 comments

Comments

@tullyhansen
Copy link

Doing this this year, yeah.

@tullyhansen
Copy link
Author

Dev Diary 2014-11-07

I skipped my intended MVN (minimum viable novel - ALARM, the word 'beep' fifty thousand times) and have instead been noodling about with BBEdit and regular expressions, particularly Multi-File Find. I've been pointing the following expression…

\b((She|He) \w+?ed\b[^"“”A-Z]+?[.?!])

… at the folder of 50 SF Masterworks .epubs I torrented some time back (and never read). Basically pulling for (likely) complete past tense sentences in which 'he' or 'she' does something, while seeking to avoid any pesky punctuation or proper nouns. The resulting lines are sorted on second word, using BBEdit's Sort Lines… and subpattern matching:

\bS?[Hh]e (.*)

Which yields something like:

He continued on then, searching for the vacuum cleaner.
She continued silently scrubbing, her eyes coming up every few seconds to check the blood pressure monitor.
She continued skimming, back and forth .
She continued standing outside.
He continued stroking her hair but it had become a mechanical action, without volition or desire.
She continued to face me, her back to him.

So far I think there's something there…? Perhaps unsurprisingly, "He x'd"s outnumbers "She x'd"s by a factor of three. Have been considering the possibility of flipping gender of the sentences (again, think this is pretty doable with RegEx, in two halves), but haven't thought through technical/grammatical/theoretical implications of this.

Once I have the patterning down I figure I can turn it into a python/shell script of some sort p. easily? Or at worst an Applescript.

@hugovk
Copy link
Collaborator

hugovk commented Nov 7, 2014

Might work well to alternate He... She... sentences and ditch the excess.

@cpressey
Copy link

cpressey commented Nov 7, 2014

Definitely scores some points* so far for using something that isn't generally recognized as a "programming language" to generate the text. (Last year, one of the entries was generated using a video game construction kit. I liked that.)

*in my personal points scale, whatever that might be exactly. I would have said "scores some points in my book", but in this context that idiom is, er, fairly confusing.

@tullyhansen
Copy link
Author

@hugovk: I'll likely try this, too, though I'm not sure whether the asymmetry is a boon.
@cpressey: Thanks! I'd use a proper programming language if I could, and part of the impetus in playing this year is to mess about in Python, but I'm not yet at that point.
Something else I'm considering is how to deal with 'it' sentences, e.g.:

He controlled it as best he could, unwilling to sound the alarms on the telemetry.

I wonder whether him/her respectively as a drop-in replacement might work/be interesting, though it's not always so grammatically simple (as in the case of 'He decided it did.')…

@hugovk
Copy link
Collaborator

hugovk commented Nov 7, 2014

The vague, unknown it works quite well.

@cpressey
Copy link

cpressey commented Nov 7, 2014

@tullyhansen Ah, well, improving one's chops at a technology with which one is unfamiliar (and this includes programming languages) is a noble NaNoGenMo goal too, of course. Actually, just generating 50k meows in some 'orrible language like Malbolge or Wierd would be a feat.

@hugovk As I was typing the previous paragraph it occurred to me that the pronoun one is also vague and unknown and

One controlled it as best one could, unwilling to sound the alarms on the telemetry.

Hmmmm.

@MichaelPaulukonis
Copy link

Speaking of obscure technologies, somebody's trying to rewire Nethack to output text.

@MichaelPaulukonis
Copy link

Any update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants