I hope it's not too late to answer this question... I've had kinda poor internet access, despite this being a computer language conference.
The rules looked like this (sorta):
1 S NP VP
1 NP ProperName
1 NP Det NBar
1 NBar Adj NBar
1 NBar N
1 VP VTrans NP
1 VP VIntrans
1 VTrans kiss
1 VTrans smite
1 VTrans carry
1 VIntrans rise
1 VIntrans fall
1 Adj red
1 Adj blue
1 Adj heavy
1 ProperName Arthur
1 ProperName Gwen
1 Det a
1 Det an
1 Det the
1 N sparrow
1 N coconut
1 N wind
The first column indicates relative weight (likelihood in text generation, score in parsing), the second column indicates the symbol.
The harness code was made up of two things:
a parser that, given a sentence, searched this grammar for the highest "weight" sentence
a generator that began at the S token and randomly selected expansions ("randomly" being "according to their proportional weight").
I doubt that programmers would find this part challenging -- the hard part was trying to write a CFG for English.
Re: Crikey!
Date: 2003-07-06 09:01 am (UTC)I hope it's not too late to answer this question... I've had kinda poor internet access, despite this being a computer language conference.
The rules looked like this (sorta):
The first column indicates relative weight (likelihood in text generation, score in parsing), the second column indicates the symbol.
The harness code was made up of two things:
- a parser that, given a sentence, searched this grammar for the highest "weight" sentence
- a generator that began at the S token and randomly selected expansions ("randomly" being "according to their proportional weight").
I doubt that programmers would find this part challenging -- the hard part was trying to write a CFG for English.