-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
35 lines (29 loc) · 1.58 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
generate.py - takes in a grammar file and generates n sentences
timing - approx 15 seconds to generate 10 sentences in a ~10,000 line grammar
earley.py - takes a grammar and a list of sentences,
return True for correctly parsed sentences and False for incorrect ones
timing - approx 5 sentences to parse 10 sentences in a ~10,000 line grammar
grammar/ - grammar files
small-grammar.txt - little toy grammar
large-grammar.txt - a grammar designed to make legal but difficult-to-parse sentences
this grammar tends to produce very garden path-y sentences
if you uncomment line 47 of generate.py it will product a bracketed sentences
to aid human readers
if you uncomment line 62 it wil output all the rewrite rules it uses in order
Small Grammar Example Sentences:
is it true that a poppy played with Pru ?
is it true that Pru played ?
the president perplexed every perplexed president !
the platitude played !
Pru played !
Large Grammar Example Sentences:
outside this cacophony this expert will neigh !
your marshmallow force-feeds one genie this oxtail that ships the scollop eight considerations and housekeepers and two tsetses .
that electrocution could conk off .
what is he ?
that heaven earlier sways back .
nine gibbons were deep freezes !
the charity and one web and that spookier forefoot would beware that squall .
may seven devotions that would vote the basilisks brainwashed plum-puddings and fly-swatters deny loons the escapement ?
is it flaps ?
this gauchest vulgarian shall dilly dally .