Epigram: Difference between revisions

From Woozle Writes Code
Jump to navigation Jump to search
htw>Woozle
(data file)
No edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[User:Woozle|Woozle]]: [[Woozle's Projects|Projects]]: [[Epigram]]
[[category:project]]
 
[[File:2019-12-07 Toot Cat.screenshot.epigram.png|thumb|a screencap of the [[epigram]] bot on [[TootCat]]]]
==About==
==About==
Epigram is an idea I came up with while at [http://brown.edu/ Brown] in the late 1980s, although the seeds of it were actually planted by a wordgame article in (of all places) a ''[[Wikipedia:The Weekly Reader|Weekly Reader]]'', probably in 2nd grade circa 1972-3.
{| align=left class=wikitable style="margin-right: 1em;"
 
|-
The idea is, basically, that you have a template, such as "'''* is the * of *.'''" Each "*" in the template has a set of words which can be used to fill it in. When you run epigram, you tell it the template and the list of words, and it randomly chooses from the list to fill in the template (avoiding duplication where possible).
| align=right | '''source''': || [https://gitlab.com/woozalia/epigram GitLab]
 
|-
I came up with a handful of templates, one of which told a little story if you ran it several times in succession. I still have the Turbo Pascal code here somewhere... will post on GitHub when I can.
| align=right | '''bot''': || <html><a rel="me" href="https://toot.cat/@epigram">TootCat</a></html>
|}
[[Epigram]], at its core, is a program which constructs sentences and phrases from human-edited templates. The idea is, basically, that you have a template, such as "'''* is the * of *.'''" Each "*" in the template has a set of words which can be used to fill it in. When you run epigram, you tell it the template and the list of words, and it randomly chooses from the list to fill in the template (avoiding duplication where possible).


<s>For a demonstration of Epigram in action, see the [http://hypertwins.org/epigram/ Epigram Demonstration Page].</s> Eep! That page seems to have been lost in a migration several years ago, where I [thought I] backed everything up, but many of the folders were empty. Konquerer needs a "paranoid mode" which does a compare after it thinks it is done copying. Ultimately I will rewrite Epigram as a MediaWiki extension...
Its current incarnation is as a bot running on [[TootCat]] which posts twice a day, picking a meta-template at random. A "meta-template" creates longer chunks of text out of multiple smaller chunks generated by templates.
==History==
I came up with the idea while working at [https://www.brown.edu/academics/cognitive-linguistic-psychological-sciences/ Brown] in the late 1980s, although the seeds of it were originally planted by a word-game article in (of all places) a ''[[Wikipedia:The Weekly Reader|Weekly Reader]]'', probably in 2nd grade circa 1972-3.


[[/text data]]
I wrote a version in Turbo Pascal (which may have been based on a version I wrote in the Pascal which came with the {{l/htw|IBM CS-9000}} I had for awhile) while at Brown, then later wrote a version in Perl for which I had set up a web page sometime in the early 2000s; not sure where that code is anymore.
==To Be Done==
==To Do==
* Need to write a PHP version so that it can be used within a wiki, for extra silliness. (People could edit the wordlists and submit their own.)
It'd be nice if I could come up with a way for users to suggest their own additions to the templates. This seems doable but nontrivial.
* An OStatus bot like [https://mastodon.social/@bepis bepis] also seems like a thing that should be done.


[[Category:Projects|Epigram]]
[[File:Rickroll flowchart.png|thumb|left|The spec syntax also needs to be flexible enough to allow for something like this.]]

Latest revision as of 00:48, 4 December 2022

a screencap of the epigram bot on TootCat

About

source: GitLab
bot: TootCat

Epigram, at its core, is a program which constructs sentences and phrases from human-edited templates. The idea is, basically, that you have a template, such as "* is the * of *." Each "*" in the template has a set of words which can be used to fill it in. When you run epigram, you tell it the template and the list of words, and it randomly chooses from the list to fill in the template (avoiding duplication where possible).

Its current incarnation is as a bot running on TootCat which posts twice a day, picking a meta-template at random. A "meta-template" creates longer chunks of text out of multiple smaller chunks generated by templates.

History

I came up with the idea while working at Brown in the late 1980s, although the seeds of it were originally planted by a word-game article in (of all places) a Weekly Reader, probably in 2nd grade circa 1972-3.

I wrote a version in Turbo Pascal (which may have been based on a version I wrote in the Pascal which came with the IBM CS-9000 I had for awhile) while at Brown, then later wrote a version in Perl for which I had set up a web page sometime in the early 2000s; not sure where that code is anymore.

To Do

It'd be nice if I could come up with a way for users to suggest their own additions to the templates. This seems doable but nontrivial.

The spec syntax also needs to be flexible enough to allow for something like this.