Appendix 8: worked translation example
What needs to be translated?
As was seen in "Appendix 7: worked calculation example" a route was produced that looked like this:-
- <HB1 1TPH><FfootF><B2B><IBristolI><G 884880 G>
- <A2A><HBristolH><ESEE><CM4C><D40kmD><FcarF><B6B><ISwindon I><G 884900 G>
- <A6A><HSwindonH><EEE><CM4C><D90kmD><FcarF><B5B><IReading I><G 884990 G>
- <A5A><HReadingH><ENE><CM2C><D10kmD><FcarF><B4B><IOxford I><G 884995 G>
- <A4A><HOxford H><FfootF><IOX2 6UDI><G 884995 G>
How would this be translated into a human language?
Version 1: the verbose option
This version translates all the tags into a meaningful phrase. It is used when the size of the output is not a problem, eg for HTML output. The tags are replaced as follows:-
Replace |
With |
<A..A> |
nothing: get rid of it |
<B..B> |
nothing: get rid of it |
<C..C> |
"via .." |
<D..D> |
"for .." |
<E..E> |
change <EWE> to " heading West", <ENE> to " heading North" and so on |
<F..F> |
"by .." |
<G..G> |
"arriving at".."minutes" and translate the time into English |
<H..H> |
"* Go from.." |
<I..I> |
"to .." |
These expressions would turn:-
- <HB1 1TPH><FfootF><B2B><IBristolI><G 884880 G>
- <A2A><HBristolH><ESEE><CM4C><D40kmD><FcarF><B6B><ISwindon I><G 884900 G>
- <A6A><HSwindonH><EEE><CM4C><D90kmD><FcarF><B5B><IReading I><G 884990 G>
- <A5A><HReadingH><ENE><CM2C><D10kmD><FcarF><B4B><IOxford I><G 884995 G>
- <A4A><HOxford H><FfootF><IOX2 6UDI><G 885025 G>
into:-
- Go from B1 1TP by foot to Bristol arriving at noon Sept 6th
- Go from Bristol heading South East via M4 for 40km by car to Swindon arriving at 12:20 Sept 6th
- Go from Swindon heading East via M4 for 90km by car to Reading arriving at 13:50 Sept 6th
- Go from Reading heading North East via M2 for 10km by car to Oxford arriving at 13:55 Sept 6th
- Go from Oxford by foot to OX2 6UD arriving at 14:25 Sept 6th
Version 2: the brusque option.
This version blanks out some of the tags. It is used when the size of the output is a problem, eg for Wap output. The tags are replaced as follows:-
Replace |
With |
<A..A> |
nothing: get rid of it |
<B..B> |
nothing: get rid of it |
<C..C> |
"via .." |
<D..D> |
"for .." |
<E..E> |
change <EWE> to "West", <ENE> to "North" and so on |
<F..F> |
"by .." |
<G..G> |
nothing: get rid of it |
<H..H> |
"* Go " and lose the tag contents |
<I..I> |
"to .." |
These expressions would turn:-
- <HB1 1TPH><FfootF><B2B><IBristolI><G 884800 G>
- <A2A><HBristolH><ESEE><CM4C><D40kmD><FcarF><B6B><ISwindon I><G 884900 G>
- <A6A><HSwindonH><EEE><CM4C><D90kmD><FcarF><B5B><IReading I><G 884990 G>
- <A5A><HReadingH><ENE><CM2C><D10kmD><FcarF><B4B><IOxford I><G 884995 G>
- <A4A><HOxford H><FfootF><IOX2 6UDI><G 885025 G>
into:-
- Go by foot to Bristol
- Go South East via M4 for 40km by car to Swindon
- Go East via M4 for 90km by car to Reading
- Go North East via M2 for 10km by car to Oxford
- Go by foot to OX2 6UD
which is about as brusque as the route can be whilst still remaining comprehensible.
Version 3: compress the route.
It may have been noticed that the route invoves going from Bristol to Swindon on the M4, followed by Swindon to Reading on the M4. This can be compressed by turning this:-
- <A2A><HBristolH><ESEE><CM4C><D40kmD><FcarF><B6B><ISwindon I><G 884900 G>
- <A6A><HSwindonH><EEE><CM4C><D90kmD><FcarF><B5B><IReading I><G 884990 G>
into this:-
- <A2A><HBristolH><ESEE><CM4C><D130kmD><FcarF><B5B><IReading I><G 884990 G>
and the translation can proceed as before.