The BBC Shipping Forecast has a very strict format. This repo contains a specification for Shipping Forecasts in EBNF.
Actual shipping forecasts will deviate from these rules - there's a bit more wiggle room in the general synopsis and the wording of the area forecasts. Nonetheless, this specification captures the general structure and will cover most parts of most forecasts.
One fun result of this is that random shipping forecasts can be generated - select "Test against non-terminal" and press "GENERATE RANDOM <FORECAST>".
e.g:
And now the Shipping Forecast, issued by the Met Office on behalf of the Maritime and Coastguard Agency at 14:23 today.
There are warnings of gales in all areas except German Bight and Irish Sea.
The general synopsis:
Low east of German Bight 964, deepening quickly, expected northwest of Bailey 935 by 17:46 tomorrow. Medium east of Southeast Iceland 991, clearing very rapidly, expected west of Shannon 960 by 00:04.
The area forecasts for the next 24 hours:
Dogger and Fair Isle. East hurricane force 12 to gale 8. Light showers. Very poor, occasionally good.
Trafalgar, German Bight, and Biscay. Southwest storm 10 to hurricane force 12. Heavy snow. Moderate. Moderate icing.
Bits which don't make sense (mostly because of the limitations of EBNF):
- Lists of areas, lists of wind strengths, etc. can contain duplicate elements:
- For example "FitzRoy, FitzRoy and FitzRoy: ..." is possible, but makes no sense
- In reality, all areas must be covered in the area forecast - this isn't enforced
- The general synopsis is actually fairly free-form, some synopses won't be covered by this
- In reality, the forecast must be less than 350 words
- There's some duplication I don't like in the EBNF, especially as a result of capitalised and uncapitalised terminals - maybe there's a better way to do this that I'm missing?