2 April 2002 Notes on Census data name file To exclude puerto rico, san juan, guam, etc, choose a record less than # 23435. The places.txt file had a few bogus "(remainder)" entries that I deleted. There are 64 locations that have more than 250,000 people [saved as place250K.htm] on E: drive. There are 200 locations that have more than 100,000 people [saved as place100K.htm] on E: drive. There are 555 locations that have more than 50,000 people [saved as place100K.htm] on E: drive. Found a program in perl that computes crow-flight distance given latitude and longitude of two locations. It's called dist_pl.pl. You can run it from the command line: > perl dist_pl.pl great-circle distance from 40.33N 79.33W to 40.55N 80.33W is 88 km 54.7 miles 47.5 nautical miles initial heading: 286 degrees (west-northwest) * * * * * * * 3 April 2002 It's time to put together a rudimentary runtime system for content generation. Design criteria: Robust perl core: Admits templates to be added, modified and extended *without* writing more perl. No perl bleed through into data files. Glossary Template: A .tmx file The template definition is used to describe a simple grammar of templates. Template expansion is a simple string operation (fill-the-holes). In addition to simple template expansion, the template definition language supports random alternation (to add variety to the text produced), conditional expansion (to embed different templates depending on the value of a parameter) and recursive template embedding (to allow a compositional description of templates). The toplevel template for a business letter might look as follows: [Address] [Date] Dear [Title][Name]: (Opening[Problem]) (Body[Problem]) (Closing[Problem]) (If [Tone]="Formal" "Sincerely," else "Thank you,") [OperatorName] The problem definition module is used to associate templates with a decision tree. At runtime, the generator asks questions to the user by following the decision tree described in the problem definition module, and in the process, acquires the values of parameters - either directly from the user or from a database. Once the decision tree is traversed, a template is associated with each leaf and the template is instantiated with the value of the parameters. Within the template, all references to objects in the domain are marked as special slots within the template - and not expanded as simple strings. Instead, the information to build noun phrases is passed to the NP generator that takes into account the discourse context to decide what form of NP is most appropriate at each point. The NP generator can decide to build a pronoun, a complete noun-phrase with all modifiers, a light noun-phrase with only a subset of the modifiers or a one-anaphora. Different algorithms can be tested on the output and changed at runtime. The runtime generator interacts with the user and the database to obtain information on the specific case at hand, select an appropriate template, and fill it with the obtained data. The NP generator is then invoked on the expanded template and a complete text is produced. GUTHRIE, Okla. -- Four prisoners broke out of a county jail Wednesday by smashing through a ceiling and an inner wall and escaping through an air conditioning duct. They then climbed over a 10-foot fence topped with razor wire, Sheriff Randy Richardson said. They may have fled in a minivan discovered stolen Wednesday morning. A shoe and a piece of torn clothing were found near the fence. Richardson said bars cover the air conditioning vents at the Logan County Jail, but once the prisoners broke through the ceiling and the inner wall, they were able to get behind those bars. The jail, located near a historic district of antique shops, is more than 100 years old. The escaped convicts were identified as Timothy Glenn Garner, 20; Phillip Dean Hancock, 38; Dedrick Max Bloss, 22, and Tanner Michael James, 22. Garner was being held on charges arising from a domestic dispute and an assault on a police officer. Hancock faced drug charges. Bloss and James had transferred to the jail from other facilities, and the sheriff wasn't immediately sure what charges they were facing. They were all in the same cell at the time of the early morning escape. They were discovered missing during a 6 a.m. head count. Richardson said sanding and repainting work is under way at the jail and may have covered up any noise made in the escape.