49
Gaiku Yael Kinor Generating Haiku with Word Association Norms Article by Yael Netzer, David Gabay, Yoav Goldberg, Michael Elhadad

Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Gaiku

Yael Kinor

Generating Haiku with Word Association NormsArticle by Yael Netzer, David Gabay, Yoav Goldberg, Michael Elhadad

Page 2: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Contents- Computational Creativity

- What is Haiku?

- Where to start?

- Algorithm

- Experiment

Page 3: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Computational Creativity Model, simulate or replicate creativity using a computer

- Program capable of human-level creativity

- Better understand human creativity

- Enhance human creativity

Page 4: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Computational Creativity Challenge -

Understanding and modeling vague knowledge (beautiful, touching, funny)

Page 5: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Oulipo Ouvroir de littérature potentielle - “Workshop of Potential Literature"

- French writers and mathematicians- Founded in 1960- Create works using constraints

“seeking of new structures and patterns which may be used by writers in any way they enjoy."

Page 6: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Oulipo Methods

- N+7- Lipogram- Combinatorics- Snowball

Page 7: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Poetry Generation

Three properties -

- Meaningfulness

- Grammaticality

- Poeticness

How can we apply to Haiku?

Page 8: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Haiku俳句

Short form of Japanese poetry from 16th century

- Present tense, no judgment words

- Beauty lies in the things left unsaid

- Read between the lines

- Minimalism

- Express anything and everything

Page 9: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Haiku俳句

Follows three technical rules -

- Kireji = cutting word

- 17 on = syllables

- Kigo = seasonal reference

Page 10: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Kireji Special category of words

- Sense of closure or pause

- Emotional flavour and emphasis

- Ka, kana, -keri, -ramu, -shi, -tsu, ya

- No exact equivalent in English (dash, ellipsis)

Page 11: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

On Phonology unit that determines syllable weight (μ)

- A long vowel is one syllable but two moras

(Aa, Ou, Ei)

- 17 moras - 3 lines of 5 / 7 / 5

We will talk about syllables

Page 12: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Kigo A word or phrase associated with a particular season

- Categories - seasons, plants, animals, earth,

humanity, heavens

- Early/Mid/Late of Spring/Summer/Autumn/Winter

- Saijiki

Page 13: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

古池や蛙飛びこむ水の音 

furu ike ya / kawazu tobi komu / mizu no oto

an old ponda frog jumps intothe sound of water

Basho - 17 cen.

Page 14: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Haiku俳句 - Kireji = cutting word

- 17 on = syllables

- Kigo = seasonal reference

Page 15: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Haiku俳句 To convey one's mood In seventeen

syllables Is very diffic[Haiku, defined by John Cooper Clarke]

We will use a less constraining definition..

Page 16: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

How to write a computer program to generate Haiku?

Page 17: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Let’s ask Stack Overflow

Page 19: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

We Need Words

Human mind uses varied associations

- Paradigmatic - (doctor-nurse)

- Syntagmatic - (mash-potato)

- Emotional - (math-yuck)

Page 21: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

WANs Word Association Norms

- 40 years of psychological research

- Typical associations evoked by trigger

- Stable across people, time, language

Excellent for Haiku!

University of South Florida Free Association Norms

- 5K cue words + 10K additional words

Page 22: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Are Haiku more associative than news or prose?

Page 24: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

WANs

Modelling

WAN graph

Page 25: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

WANs Basic definitions -

Shortest path distances -

asso_dist(w1, w2) , wordNet_dist(w1, w2)

If [ asso_dist(w1, w2) < 3 ] => asso_related(w1, w2) = 1If [ wordNet_dist(w1, w2) < 4 ] => wordNet_related(w1, w2) = 1

If [ w1, w2 in WAN ] => in_wan(w1, w2) = 1

Page 26: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

WANs

Page 27: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

WANs

Associativity Test

- 200 Haiku- 12 word sequences Project Gutenberg- 12 word sequences NANC newswire corpus ($$)

Page 28: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Generating Haiku using WANs

5 stages of creative process -

- Theme selection

- Syntactic planning

- Content selection / semantic planning

- Filtered over-generation

- Re-ranking

Page 29: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Dataset

- USF WAN - 15K words

- Haiku corpus - 3500 English Haikus

- Google N-grams - 1TB of data

- Project Gutenberg - Easier to POS tag

Page 30: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Theme Selection

1. User supplied seed word

2. Consult WAN database -

● 8 x Random walks from seed, 3 steps

● Keep all resulting words

Page 31: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Theme selection

Random walks -

association graph vs. WordNet graph

Page 32: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Syntactic Planning

Training stage -

1. POS-tag each Haiku

2. Extract line pattern - “DT_the JJ NN”

3. Top 40 frequent line patterns

=> Total 120 patterns

Page 33: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Syntactic Planning

Generate Haiku -

- Choose random pattern for 1st line

- Choose 2nd line

- Choose 3rd line

Page 34: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Syntactic Planning

Result - 3 line Haiku skeleton -

- Num of words in each line

- POS tags of words

- Placement of function words

Page 35: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Content Selection

For each Haiku line -

- Search match in datasets (Google, Project Gutenberg)

- Syntactic patterns

- 1st line to contain seed word

- 2nd and 3rd contain any theme word

Page 36: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Syntactic Planning

NN NN

DET_a NN of NNS

PP_in DET_the NN

alligator peara handful of whitesin the spring

avocado peara kind of bootsin the fall

pear salada season of tearsin the summer

pear treea seasoning of spicesin the fall

Page 37: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Over Generation

- Create all possible Haiku candidates!- Filter away Haikus with undesired properties

Page 38: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Algorithm

Re-ranking

Heuristics -

Maximize number of 2nd degree associations

*This method chooses quantity over quality..

Page 39: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Is computer generated poem good enough?

Page 40: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

fishing guidesboat in the backgrounda new trip

blossomlessbut not unlovedthe old magnolia

first date —the little pileof anchovies

a holy cowa carton of milkseeking a church

blind snakeson the wet grasstombstoned terror

iced over pondI skip a rockthe entire width

Page 41: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment Turing Test

Test of machine's ability to exhibit intelligent behaviour equivalent to, or indistinguishable from, that of a human.

Page 42: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment First set (AUTO)

- 10 random Haikus from corpus- 15 computer generated Haikus -

- Human identify main words in first line- Use main word as seed - 2 main words => 2 haikus

Second set (SEL)

- 9 award-winning Haikus - 17 human-selected computer generated Haikus

Page 43: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment - 50 adult subjects

- “Human” / “Not Human”

- 1-5 grade

Page 44: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment

Results

(SEL) 66.7% correct (AUTO) 61.4% correct

Page 45: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment

AUTOResults

Cherry tree / poisonous flowers lie / blooming (72.2% human)

Spring bloom / showing / the sun’s pyre(63.8% human)

Page 46: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Experiment

SEL Results

Early dew / the water contains / teaspoons of honey (77.2% human)

Space journey / musical instruments mythology / of similar drugs(9% human)

Page 47: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Can a computer generated creation capture the beauty of

a flower?

Page 48: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

Future work

- Enrich information in WordNet

- New creative structures

- Assisting with SLI

Page 49: Generating Haiku with Word Association Normskfirbar/DH/gaiku-yael.pdfWANs Word Association Norms - 40 years of psychological research - Typical associations evoked by trigger - Stable

fishing guidesboat in the backgrounda new trip

blossomlessbut not unlovedthe old magnolia

first date —the little pileof anchovies

a holy cowa carton of milkseeking a church

blind snakeson the wet grasstombstoned terror

iced over pondI skip a rockthe entire width