Tuesday, 26 May 2015

Introducing Emily - my latest Fantastical Device

Emily is a semantic recommendation system for blogs that I've been working on. If you give it an Atom or RSS feed from a blog, it will create a feed of items from other blogs that hopefully match your interests.

It does this by using significant associations between words to infer your interests. Suppose a randomly-chosen sentence from your blog has a probability P(A) of containing word A, and a probability P(B) of containing word B. If there were no relationship between the words, we would expect the probability of a sentence containing both words to be P(AB)=P(A)P(B). If there is significant information contained in the relationship between the words, they will cooccur more frequently than this, and we can quantify this with an entropy, H=log2 P(AB) - log2 P(A) - log2 P(B)

Emily uses the strengths of these associations to calculate the similarity between two blogs. Then, if you post an article that makes your blog more similar to somebody else's blog than it was before, that article is recommended to them.

This has been an interesting project for me. I've learned about Google App Engine, pubsubhubbub and Atom. What I need now is for people to try it out. I'm looking forward to when Emily starts finding things for me.

Thursday, 21 May 2015

Developing Emily - Revision 23: Ready to launch

Changed Paths:
    Modify    /trunk/Emily.py
    Modify    /trunk/EmilyBlogModel.py
    Modify    /trunk/EmilyTreeNode.py
    Add    /trunk/emily.js

Ready to launch

from Subversion commits to project emily-found-a-thing on Google Code http://ift.tt/1IN7SNv

Thursday, 15 January 2015

Alan Fridge

"From now on all rumours must be attributed to Alan Fridge!! BBC mole, Cardiff insider—Alan Fridge!!!"
—Steven Moffat (personal friend of Alan Fridge), Outpost Gallifrey Forums, 6 August 2007

Last year, a tabloid newspaper published a rumour that Jenna Coleman (who plays Clara) was leaving Doctor Who. It was, of course, complete rubbish, Jenna was quick to make it clear that she wasn't going to answer the question either way, since it was a goldmine of free publicity - something that the rest of the cast, crew and publicity department got on board with. Just before Christmas, when the fact that Jenna was staying couldn't be kept secret any longer, the rumourmonger tried to save face by claiming that she'd had a last minute change of heart, and that the ending of _Last Christmas_ had been hastily rewritten to accomodate this. However, the ending certainly didn't look tacked-on.

So who is Alan Fridge? My theory is that he's a low-ranking member of the production team, a runner or somebody like that. He's around a bit during filming, and picks up things like the row between Clara and The Doctor in _Kill the Moon_, or the old Clara scene in _Last Christmas_, but he doesn't have the big picture. He leaks information to the tabloids to make himself feel important, and probably for a kickback.

Monday, 3 November 2014

Orpheus in the TARDIS

As The Doctor noted in Dark Water, almost every culture has legends of an afterlife, and throughout this season we have seen Missy and her assistant Seb welcoming various characters to it. But which culture's afterlife is it? Despite Missy referring to it as "The Promissed Land" or "Heaven", it's not any contemporary religion's paradise. "The Nethersphere" is a more apt name, as it seems to based on the ancient Greek Underworld.

The plot of Dark Water parallels the Greek myth of Orpheus and Euridice. Clara takes the role of Orpheus, trying to recover Danny from the Underworld. In some versions of the Orpheus myth, Orpheus is unwittingly responsible for Euridice's death, as the fact that his music tames all wild beasts has left Euridice unafraid of snakes. Clara is unwittingly responsible for Danny's death, since her phone call distracted him while he was crossing the road. Volcanoes are often portrayed as gateways to the underworld.

There were various rivers in the Underworld. The most famous was the Styx, which was notably murky (stygian) - it was dark water. Having been bathed in the Styx was what gave Achilles his famous invulnerability - a power he shares with the Cybermen. Another of them was the Lethe, the river of forgetfulness. Those who drank from the Lethe forgot their former lives, and could then be reincarnated. The chance to forget his former life is what Seb offers Danny, although he doesn't explain that he's planning to reincarnate Danny as a Cyberman.

In the Orpheus myth, it is scepticism that proves Orpheus' downfall. Unwilling to trust Hades (who has never given up one of his subjects before), Orpheus breaks his promiss not to look back, and thus loses Euridice forever. Clara, encouraged by the Doctor to demand proof of Danny's identity, allows him to goad her into cutting off the conversation (ironically by repeating what she was telling him when he died), because he does not want her to risk her own life. We end the episode with the threat that Clara may lose him forever…

Monday, 6 October 2014

Why Doctor Who needs a Scientific Advisor

Any sufficiently advanced technology is indistinguishable from magic.
- Arthur C. Clarke

A plot hole isn't something that's not explained. It's something you can't explain.
- Steven Moffat

Where does she get the milk for the soufflés?
- The Doctor Asylum of the Daleks

Kill the Moon was a weak episode. The theme of whether one should be prepared to do evil in the pursuit of a perceived greater good is a favourite one with Doctor Who, explored famously in Genesis of the Daleks, and more recently in The Beast Below and The Day of The Doctor. The Doctor's motives for leaving Clara and Courtney to make the crucial decision could have been better explored - a line to the effect of "I trusted you to do the right thing. I didn't trust myself," would have made far more sense of his actions. But the big problem is that the premisses of the story just didn't make sense.

We have a pretty good idea what the Moon is made of and how it was formed. If it were the egg of a giant space creature, the Apollo astronauts would have noticed. Even if it were, it wouldn't suddenly become heavier when it hatched - conservation of mass is one of the most basic laws of physics, so if something gets heavier, the extra mass has to come from somewhere. Bacteria are the size they are because their simple prokaryotic metabolism won't scale up. An oversized spider has to be a multicellular, eukaryotic organism. Even if a giant dragon could hatch out of the Moon, it couldn't fly away by flapping its wings in space - wings need an atmosphere to work. And if it did fly away, the gravitational effects of such a large thing doing so would seriously perturb the Earth's orbit. And no organism could lay an egg larger than itself immediately after hatching.

OK, this is a show about an alien who travels through time in a ship that's bigger on the inside, but even in that context these errors break suspension of disbelief. There's a difference between asking, "What if time travel were possible?" and just not caring about basic physics. The Doctor Who production team needs someone to consult about the scientific plausibility of a story, someone who could tell writers when something didn't work, and what they could do to improve it. "Either you need another way to set up your ethical dilemma, or we can work out something else that could be wrong with the Moon."

The worst story this century could have been vastly improved by a bit of scientific advice. "The monster could be a giant intelligent slime mould that engulfs its prey, and absorbs their knowledge as it digests them. It adopts the likeness of previous victims as camouflage. After The Doctor notices that it avoids one particular woman, who wears a distinctive perfume, he realises that vanilla contains a hormone that will cause its component cells to disperse harmlessly."

Doctor Who did employ somebody in this capacity once. That was Dr. Kitt Pedlar, co-creator of the cybermen.

Even the most fantastical universe has to make sense.

Thursday, 2 October 2014

A Paradox

There is a cat in a box. Also in the box is a radioactive atom, which, if it decays within a certain interval, will trigger a time machine that sends the cat back in time to kill its own grandfather while he was still a kitten. (Why the cat has such an irrational hatred of its grandfather I don't know. I never said it was a nice cat.)

Unless you open the lid, there is no way of knowing whether there has ever been a cat in the box at all.

Monday, 21 July 2014

Starting a new conlang

I've been thinking about starting a new conlang project for a while now. I'm planning to do something with a bit of nonconcatenative morphology, not exactly Semitic but with some similar features, and I really want to try my hand at diachronic conlanging. Over the past few days I've put together the phonological development of the first few stages of the language.

Stage 0


pʰ tʰ cʰ kʰ
p t c k ʔ
b d ɟ g
f s ç x h
v z ʝ ɣ
m n


i      u



Sound changes

V>±hightone/ _ʔ
t,d>θ,ð /VV
+asp > -asp

Stage 1


p    t    c   k
b    d   ɟ    g
f  θ s  ç    x   h
v  ð z  ʝ     ɣ
m    n


i       u



Low, High


Sound changes

i,u,a> j,w,∅/ _ V

pj, tj, kj > pʲ, t͡ʃ , t͡ʃ
bj, dj, gj > bʲ, d͡ʒ, d͡ʒ
fj, sj, xj, > fʲ, ʃ, ç, ç
vj, zj, ɣj > vʲ, ʒ, ʝ
mj, nj > mʲ, ɲ
rj > ʎ
lj > ʎ
cj, ɟj, çj, ʝj > cː, ɟː, çː, ʝː / V_V
cj, ɟj, çj, ʝj > c, ɟ, ç, ʝ


tw, cw, kw > tʷ, cʷ, p
dw, ɟw, gw > dʷ, ɟʷ, b
fw, θw, sw, çw, xw, hw > ɸ, θʷ, sʷ, çʷ, ʍ, ʍ
vw, ðw, zw, ʝw, ɣw > β, ðʷ, zʷ, ʝʷ, w
nw > ŋʷ
rw > w
lw > ɫ
pw, bw, mw > pp, bb, mm / V_V
pw, bw, mw > p, b, m

Stage 3


p         t          c         k

            tʷ        cʷ
b          d         ɟ         g

             dʷ      ɟʷ
ɸ   f  θ  s    ʃ   ç        x         h
      fʲ θʲ 
         θʷ sʷ      çʷ    
β    v ð   z   ʒ   ʝ        ɣ
      vʲ ðʲ
          ðʷ zʷ     ʝʷ
m      n             ɲ      
w       r             j
          l              ʎ       ɫ


i        u

High, Low


Medial consonants may be geminated

Sound changes
Feature spreading

a, u > e, y / _Ci
i, u > e, o / _Ca
i, a > y,o / _Cu

Tone sandhi

Low>  Rising / _High
High>  Falling / High_


Primary stress on first syllable, secondary stress on odd syllables

Where 2 identical vowels (modulo tone) occur in adjecent syllables, the vowel in the less stressed syllable is deleted.

Stage 4

Consonants as Stage 3.


i y         u
  e       o

Low, high, rising, falling



By stage 4, the phonology is more or less where I want it to be, and subsequent stages will mainly be about gramaticalisation and analogy. However, I've left myself some phonological loose ends for later.

The plan is to go backwards and forwards between Stages 0 to 4 for a bit, building up basic vocabulary and grammar, and then move on to the later stages. Going backwards and forwards is partly an attempt to reconcile the diachronic method with my love of hand-crafted vocabulary. The finished product will probably be about Stage 7.