Friday, August 1, 2014

Flying

Flying is a seldom reported feature of dreams that is, nonetheless, considered a typical theme or feature.

flying: without mechanical assistance - unless the mechanical assistance is unrealistic: a flying car.

I looked at four sets of dreams where flying was fairly common to see if I could develop a regular expression that would match it with a high degree of reliability. I would like to match 80 % or more of references to flying without matching insects, planes, birds, etc. I'm really only interested in the dreamer's self reporting of flying, not on that of other dream characters.

Building the expression

The basics

  • fly|flying|flies (and maybe the grammatically incorrect "flys")
  • don't forget past tense: flew
  • (take|rook) flight
  • (float|glide|levitate) some of these might describe non-flying motion

(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)

I am only interested in dreamer flying

\b((we('re)?|I('m)?) (levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b

Misses "I was flying", "I began to fly", etc. So inset (\w+ ){0,4} = any string of word characters followed by a space. up to 4 of these, but maybe none.

Our generic word matcher (w+ )  should include a few more characters ([\w',-]+ ) to match hyphenated words, commas, contractions and possessives.

\b((we('re)?|I('m)?) ([\w',-]+ ){0,4}(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b


I get 4 or 5 times as many matches. Now let's start looking at unwanted matches. (in a large set of dreams)
  • Then we see this little floating island/amusment
  • we flew the plane
  • As I walked over to the float,
  • and when they did i did a flying kick
  • The first bird I saw flew right in front of
Javascript's regex allows negative lookahead (?! ) but not negative lookbehind. 

flying (?!birds) = match "flying" unless followed by "birds".

\b((we('re)?|I('m)?) (?!((was|were|am|are) watch(ed|ing)|see|saw) )([\w',-]+ ){0,4}(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b


(?!\b(the|an?|(air)?planes?|jets?)\b)

(?!((was|were|am|are) watch(ed|ing)|see|saw) )

But this blocks "I saw that I was floating":

\b((we('re)?|I('m)?) (?!((was|were|am|are) watch(ed|ing)|see|saw) )([\w',-]+ (?!\b(the|an?|he|she|they|see|saw|(air)?planes?|jets?)\b)){0,4}(levitat(e?d?|ing)|soar(ing)?|glide?(ing)?|fl(ew|y|oat)(ing){0,1}))\b (?!([\w',-]+ ){0,3}((air)?planes?|jet|helicopter|bird|bee|insect)s?\b)


"I was in the air, flying"
So, add a second (?!) just before the flying verbs?

Final expression?


\b((we('re)?|I('m)?) (?!((was|were|am|are) watch(ed|ing)|see|saw) )([\w',-]+ (?!\b(an?|see|saw|(air)?planes?|jets?)\b)){0,4}(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b (?!([\w',-]+ ){0,3}((air)?planes?|jet|helicopter|bird|bee|insect)s?\b)

Its only necessary to eliminate the most common false matches. Bees and helicopters might be overkill!

Also matches "I couldn't fly" But I want to know if the dreamer even expects to be able to fly. These could be eliminated by adding (\w+n't) to the lookahead.

Testing the expression

Go back to the expression for flying that doesn't specify who is flying.

(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)

Search for it in context. 

I miss a few cases where the distance between "I" and "flying" is greater than 4 words.

In one dreamset the author describes other character's flying
  • I think he was floating
  • I think one of them flew
  • I believe they had to fly
So add (he|she|they|them) to the first negative lookahead.

\b((we('re)?|I('m)?) (?!((was|were|am|are) watch(ed|ing)|see|saw) )([-'\w,]+ (?!\b(an?|the|she|he|they|them|see|saw|(air)?planes?|jets?|birds?|bees?|insects?)\b)){0,4}(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b (?!([\w',-]+ ){0,3}((air)?planes?|jet|helicopter|bird|bee|insect)s?\b)

Put the non-blocking words last in case the blocking words.

\b((we('re)?|I('m)?) (?!((was|were|am|are) watch(ed|ing)|see|saw) )((?!\b(an?|the|she|he|they|them|see|saw|(air)?planes?|jets?|birds?|bees?|insects?)\b) ?[\w',-]+ ){0,4}(levitate?|soar|glide?|fl(ew|y|oat))(e?d|ing)?)\b (?!([\w',-]+ ){0,3}((air)?planes?|jet|helicopter|bird|bee|insect)s?\b)

Al (skimmed from www.dreamjournal.net)
0.1113 % of words

Marco (collected from alt.dreams)
0.0806

Pegasus (http://www.dreambank.net/)
0.1049

Paul (private collection)
0.0638

I did a Compare search around the matches. The only unexpected features across the four sets was an increase in color and geographic description. The most frequent fliers were all male.
In all four of the gender-pairs sets of dreams I tested males had 2 to 3 times as many reports of flying.

*Compare does a search for 100 content categories in paragraphs where the target expression matches. It then does a log-likelihood comparison against the non-matching paragraphs of the dream set.

baseline female 0.0318, male 0.054

college 1999 female 0.0227, male 0.0492

harris youth female 0.034, male 0.113

blind female 0.0139, male 0.0265

Validation

I used Kelly Bulkeley's baseline set (http://kellybulkeley.org/creating-baseline-studying-patterns/) to search for the plain flying expression.
Perhaps 75 of the matches that I've marked with a + or ?
. one in which im flying of course. others   
, and I wanted to fly to New Hampshire
of dead women floating upon a river,
floor window and floated down the roof of
up with a paddle floating down this river
all. I was to fly, a fact which has          +
vague. I was to fly alone                    ?
water out to a float. When I arrived
it seemed I was flying along in the air      +
and couldn't fly anymore and I had
why Babs was flying it. The plane was
too. Kids went flying all over. I
In my dream I was flying, above the trees    +
knowing I could fly when I wanted to         +
garbage debris floating around on it. I
orange peelings floating around and other
I was flying in the sky, it                  +
how it feels to fly like a bird"". I 
when I was flying and that it was a          +
the golden hawks flying in the beautiful
realized I could fly and nothing could       +
being able to fly a broomstick,              ?
was the joy of flying and the cool wind 
learned how to fly  
the dream did we fly or go by boat. I        +
. I would fly through the air                +
I dreamed I was floating over a huge         +
bed and started floating above myself. I     +
everything was flying up and horsers
there. He is flying his military
window and start flying through the sky.
of the house. I fly away and that's          +
that i could fly not like a bird i           +
. In it I could fly but not very well        +
. I would be flying low (more like           +
floating) over my
. There were floating candles in the
at the loud jet soaring above me, a red
as being able to fly or hover. In
log cabins that floated on the water, it
that were also floating and thinking,
sure. We would fly together to               ?
airplane. We were flying through some        
.Run very fast , fly. i was then i           ?
mane and tail, flying like my hair. The    
on a machine and fly the 7 miles to 
I had dreams of flying (just me, no          +
the sensation of flying. The joy I felt      +
i jumped i would float high up as if i       +
was flying. also i held an
me go far as in float far. It was a
them and they fly it back into new
had dreams about flying/falling. One         +
My mom and I were floating on a mattress in  ?
wish that I could fly. I blasted off         +
ship while I was flying and my mom granny  
my partner and I flying our immediate
my area and I was flying. I felt like I      +
who saw me flying. I wish that               +
and planned to fly it himself
I was flying over the ocean. I               +
and military jets flying in. It was night
him in heaven, floating on a cloud. I was
dream about flying and/or falling--I         +
would be flying high in the air,
California. I floated into a home (not       +
stairs and then floated all the way down
me and I started floating but the monster    +
flying dream, as far                         +
old. Able to fly, but tethered,              ?
, or limited to floating/flying just         ?
and it made me float in slomo            
. I pretended to float in the sandbox
I could fly. However, I                      +
, more like flying than falling. If          +
enough, I could fly through the halls        +
I was flying on a plane with a   
I'm a the plane flying just above the
the ability to fly short distances,          +
were two things floating in the murky 
over the sky and floating around the houses
into the air and fly away by flapping        +
notice that I was floating in air. I was     +
suit and I was flying very slowly over       +
colors). As I was flying over the tree       +
luminous ball floating rapidly through
of a specter floating over my bed. I
I took flight and soared above the           +
off jean shorts floating in the air     
little bubble and float up off the floor 
in which I could fly without the             +
of swim flippers floating to the shore. My 
flippers. He was floating on his back with
kind of randomly flying around the room,
and being able to float in a blue sky and    +
male pheasants fly across my path
car and rnded up flying up out the ditch
rolled 3x I went flying through the air      +
that I was flying around the Ifill           +
told her I could fly her up. We went         ?
were. They both floated away. When I went
I was in the air flying around at            +
it up I was floating through space -         +
steel and i would fly out of the cart        ?
in was an eagle flying. When I hit the
and dragons flying above looking for
into me then flying in fighter jet in
in formation, flying in an F-18
into night time flying whether in an
the Blue Angels flying it was a
commercial jet flying low and made a
hill the power to fly disappeared and I      +
have not had the flying kind for years -     +
I am assigned to fly from the new USS
week I dreamed of flying, like an eagle,     +
arms spread and soaring effortlessly. I      +
often have flying dreams but this            +
always able to fly behind the                ?
dream, just the flying and avoiding          +
pastime รป flying. I freed my mind
and was able to fly quite far before         +
, such dreams as flying over the             +
into space and fly way, way out into         +
being able to fly by leaning (like           +
that I can fly, and should just              +
that I could fly. I would just               +
. I couldn't fly really high,                +
often I'd try to fly during my waking        +
in which I could fly, at will, by            +
ground and then flying, usually around a     ?
me that we could fly (without the            +
column and rocks flying out of the  
. I would start flying (floating upright     +
I don't remember flying in any particular    +
, but after flying several hundred
from heights or floated in the air to        ?
Dream of flying through my school            +
is easier. I was floating not flying and     +
to dream I was flying a LOT, I still do      +
the dream I can float along like taking      +
will often end up flying away so high and    ?
out. The bird was flying away to feed my 
a dream that four floating monster heads (
of their car, and fly to the mall,
human partner. i fly to my residence.        +
house, music floated out to me, and I
Cub, and it was flying right at us. We
Enemy planes were flying towards Cleveland
loaded airplanes fly out of the
excited and I fly around the boat            +
the towel I could fly like a bird.           +
wires. In flying up from the
was assigned to fly a new
a blimp. It would fly back and forth
I was in a rocket flying to some body out
. He started to fly low out over a
of dream is flying over heavily              +
Force and I was flying jets in Korea. I
I was flying a small single-
another plane flying overhead and
water, but still floating and we got it to
. I seemed to be floating not walking        +
because it was flying perfectly. I just
if it wanted to fly out and I could
were many hats floating on the surface. I
a large airplane fly over my house and
as it was flying along it fired
out an army flying jacket. I had
of airplanes flying around, shooting
which were flying around level with
we were both floating in the clouds          +
total: 171
Note that style of narration reveals two new ways dreamers describe flying.
Neither use "I".
  • Dream of flying through my school
  • Flying above the ocean, not in an aircraft.
  • im flying
We can also see the the inclusion of 'the' in the lookahead will excluding at least one case
  • I was in the air flying around 
Next run the full expression on the same set which gives 66 matches;

super suit and I was flying very slowly over
in Cleveland, and I wanted to fly to New Hampshire.
first it seemed I was flying along in the air,
a canyon below. I got scared and couldn't fly anymore and I had
and knowing I could fly when I wanted to,
I was Superman. I flew through the air
I was flying in the sky, it was
was smiling when I was flying and that it was a
so afraid then I realized I could fly and nothing could
longer afraid and I flew away and escaped.
in the dream did we fly or go by boat. I
a paintbrush. I would fly through the air
I dreamed I was floating over a huge crater
of the house. I fly away and that's
outside. In it I could fly but not very well
of my childhood. I would be flying low (more like
for sure. We would fly together to
in an airplane. We were flying through some
At about age 14 I had dreams of flying (just me, no plane
but everytime i jumped i would float high up as if i
. Then My mom and I were floating on a mattress in a
space ship while I was flying and my mom granny
my partner and I flying our immediate
I was flying over the ocean. I
was nothing that I could do so I flew out of my body and
and/or falling--I would be flying high in the air,
often. One night I dreamed that I flew up into the sky
California. I floated into a home (not
was after me and I started floating but the monster
sandbox on shore. I pretended to float in the sandbox and
As a child, I flew in my dreams and
high enough, I could fly through the halls
I'd notice that I was floating in air. I was
were vague. I was to fly alone
, colors). As I was flying over the tree tops
DREAM ENDED AS I WAS FLYING STRAIGHT UP
. Suddenly, I took flight and soared above the
years in which I could fly without the normal
side of the room. I was kind of randomly flying around the room,
. In the dream, I flew from Minneapolis (
hit us broadside!we rolled 3x I went flying through the air
gave me the pill. I flew out of my bedroom
When I was 6 I dreamed that I was flying around the Ifill
in the sky. After I flew around a few times
way to the top. I told her I could fly her up. We went
them like wings. I gained flight and flew to my city's
101 Dalmations). I flew past the grand
I picked it up I was floating through space - no
steel and i would fly out of the cart
dream, I realized I was dreaming, so I flew to get there
faster. As I flew over the
my training I am assigned to fly from the new USS
effortlessly. I often have flying dreams but this
a shotgun but I was always able to fly behind the
into flight. I couldn't fly really high,
to show me that we could fly (without the
in rural Kansas. I would start flying (floating upright
100-150 feet up). I don't remember flying in any particular
now it is easier. I was floating not flying and looking out at
. I used to dream I was flying a LOT, I still do
in the dream I can float along like taking
. In other ones I will often end up flying away so high and
a human partner. i fly to my residence.
quite excited and I fly around the boat
of some sort. I seemed to be floating not walking around
badly. The next, I believe we were both floating in the clouds
total: 66

At least 3 of these matches refer to flying on a plane or space ship so we can claim at most 63 correct matches = 88 %. This figure is likely to be lower in other sets of dreams
  • in Cleveland, and I wanted to fly to New Hampshire. 
  • space ship while I was flying and my mom granny
  • In the dream, I flew from Minneapolis
So add (?! (to|from)) to the final lookahead?

Conclusion

We constructed a probably over-complicated expression for matching flying in dreams. It finds 88% of basic references to flying while blocking most false matches to flying in planes, or observing flying objects.

We've also discovered that males are more likely to report flying dreams and that reports of flying dreams contain more color than expected.

The final expression: breakdown

\b((we('re)?|I('m)?) the dreamer

(?!((was|were|am|are) watch(ed|ing)|see|saw) ) not watching

((?!\b(an?|the|she|he|they|them|see|saw|(air)?planes?|jets?|birds?|bees?|insects?)\b) ?[\w',-]+ ){0,4} not someone else, not things that fly

(levitate?|soar|glide?|fl(y|oat|ew))(e?d|ing)?)\b flying verbs

(?!([\w',-]+ ){0,3}((air)?planes?|jet|helicopter|bird|bee|insect)s?\b) not things that fly

No comments:

Post a Comment