Saturday, 1 April 2017

Cornwall to divide from Devon with new reservoirs

The Duke of Cornwall has published plans today, 1st April 2017, Dy' Kalann Ebrel, for a series of dams in the Tamar Valley. This will have a number of benefits:
  • The three reservoirs will generate hydroelectric power. They will be linked by a pumped storage system so that they can store energy generated by wind and solar farms in the area when they generate in excess of demand and allow water through the turbines generating electricity when it is needed.
  • The project will allow a new not for profit water company Dowr Kernow which will provide competition for South West Water and drive down prices for customers.
  • The new reservoirs will better define the border between Cornwall and England, which it is hoped will prevent a cross-border "Devonwall" constituency from being implemented. 
The Duke of Cornwall will be able to use feudal prerogatives to require Cornwall Council to accept the plans.

Although the required compulsory purchase of the land and buildings will be extensive, the Duke points out he does own quite a bit of it already, and has offered to give an (as yet unconfirmed) discount on new properties in the Duchy's housing development to his subjects who are affected by compulsory purchase.

The Cornwall-England border, showing the three proposed new reservoirs along the Tamar Valley
A closer view of the area, with some detail of the proposals.

Lyn Tredamar, the northernmost of the three reservoirs, with a dam near Boyton (Trevoya) giving a water level of 100m. The border will be restored to the 936 treaty border between King Athelstan of England and King Hywel of Cornwall, which will see West Bridgerule restored to Cornwall, and the part of North Tamerton east of the Tamar will revert to Devon.

The central, and largest of the lakes, Lyn Lannstevan, with a dam at Greystone Bridge and a water level of 70m. There will be a need for a new bridge to carry the A30 over the reservoir, which will also carry a cantilevered cycle track, which will connect to minor roads near Broadwoodwidger enabling bypassing of the flooded section of the road through Lifton and Tinhay.


The southernmost lake, Lyn Dowrgonna, with a dam at the location of Gunnislake bridge giving a water level of 50m. The Tamar Valley Area of Outstanding Natural Beauty is shaded in yellow, and the Cornish Mining World Heritage Site in grey. Some of the historic ruined buildings which are part of the World Heritage Site will need to be moved to higher ground. Doing this in a UNESCO World Heritage Site will be controversial, but it is hoped that the planned moving of Stonehenge to make way for the new A303 dual carriageway will set a precedent which will help acceptance of this action.

The more radical proposal of creating a single 100m level reservoir with a dam at Greystone Bridge. This plan is thought to be unrealistic given the likelyhood of legal action from Devon County Council due to the quantity of land and buildings flooded.

Reservoir Total area (km^2) Average depth (m) Volume (million m^3)
Dowrgonna (50m) 7.09 16.41 116.3
Lannstevan (70m) 16.96 11.51 195.2
Tredamar (100m) 14.09 9.3 131.0
Lannstevan (100m) 83.06 18.5 1538.39

The above table shows the area and volume of the proposed reservoirs.

To store energy from renewable generation, a cubic metre of water can thus be raised 50m from Dowrgonna to Lyn Tredamar, which means it gains 1000*9.8*50 J of potential energy, or 20m from Dowrgonna to Lannstevan.

If the upper two reservoirs were emptied there could be 17.8 million kilowatt hours stored by raising water to Lyn Tredamar, and a further 10.6 million kWh by raising water to Lyn Lannstevan.

There are approximately 1100 properties expected to be below the waterline, which would rise to about 3600 if the 100m water level option was followed for Lyn Lannstevan. However, it was pointed out that this option would lead to the submerging of Prince Charles Close in Launceston, so therefore the Duke doesn't favour this option.
 Critics of the project have questioned whether this project fits in with Prince Charles' environmental campaigning however the energy storage system will support the development of renewable energy and reduce reliance on fossil fuels.

The cost of the project is unknown, however Prince Charles has assured his subjects, that it will be cheaper than Trident replacement, and less environmentally destructive than a nuclear war.

Monday, 20 March 2017

Llan50goch

Here is the result of using the regular expressions used in my Python module to segment the longest place name in the UK.

Both forward and backward segmentation are used. Background picture from Astronomy Picture of the Day.

Sunday, 19 March 2017

Syllable segmentation in Welsh

Building on previous work on syllable segmentation, I have now made an initial version of syllable segmentation in Welsh. This currently is implemented within the syllabenn_ranna_kw module, and there is also a test script regexp_test_cy.py at bitbucket.org/davidtreth/taklow-kernewek.


The output of the test script looks like this:
Each syllable is matched by a regular expression using re.findall().The output of this is a list of tuples, one per syllable. The first four elements of the tuple are used if it is a syllable beginning with a consonant, the next three if it is a syllable beginning with a vowel, and the last three if it is a syllable (either CV or V) using a vowel with an diaresis (looks like a German umlaut), which in Welsh forces it to be a separate syllable rather than part of a dipthong with a following vowel.

This is a method, matching backwards from the end of the word.



The main program splitting text into syllables in text mode syllabenn_ranna_kw.py is now able to process Welsh text (possibly erroneously). I will create a TkInter GUI app for it once I have debugged it a bit more.

Here is Mae Hen Wlad Fy Nhadau treated by the program:

Output in line mode

python3 syllabenn_ranna_kw.py --fwd --line --cyregexp maehenwlad.txt

Linenn 1
Mae:1  hen:1  wlad:1  fy:1  nhadau:2  yn:1  annwyl:2  i:1  mi:1  ,:0 
Niver a sylabennow y'n linenn = 11

Linenn 2
Gwlad:1  beirdd:1  a:1  chantorion:3  ,:0  enwogion:3  o:1  fri:1  ;:0 
Niver a sylabennow y'n linenn = 11

Linenn 3
Ei:1  gwrol:1  ryfelwyr:3  ,:0  gwladgarwyr:3  tra:1  mad:1  ,:0 
Niver a sylabennow y'n linenn = 10

Linenn 4
Dros:1  ryddid:2  collasant:3  eu:1  gwaed:1  .:0 
Niver a sylabennow y'n linenn = 8

Linenn 5

Niver a sylabennow y'n linenn = 0

Linenn 6
Gwlad:1  ,:0  gwlad:1  ,:0  pleidiol:2  wyf:1  i'm:1  gwlad:1  .:0 
Niver a sylabennow y'n linenn = 7

Linenn 7
Tra:1  môr:1  yn:1  fur:1  i'r:1  bur:1  hoff:1  bau:1  ,:0 
Niver a sylabennow y'n linenn = 8

Linenn 8
O:1  bydded:2  i'r:1  hen:1  iaith:1  barhau:2  .:0 
Niver a sylabennow y'n linenn = 8

Linenn 9

Niver a sylabennow y'n linenn = 0

Linenn 10
Hen:1  Gymru:2  fynyddig:3  ,:0  paradwys:3  y:1  bardd:1  ,:0 
Niver a sylabennow y'n linenn = 11

Linenn 11
Pob:1  dyffryn:2  ,:0  pob:1  clogwyn:2  ,:0  i'm:1  golwg:2  sydd:1  hardd:1  ;:0 
Niver a sylabennow y'n linenn = 11

Linenn 12
Trwy:1  deimlad:2  gwladgarol:3  ,:0  mor:1  swynol:2  yw:1  si:1 
Niver a sylabennow y'n linenn = 11

Linenn 13
Ei:1  nentydd:2  ,:0  afonydd:3  ,:0  i:1  mi:1  .:0 
Niver a sylabennow y'n linenn = 8

Linenn 14

Niver a sylabennow y'n linenn = 0

Linenn 15
Os:1  treisiodd:2  y:1  gelyn:2  fy:1  ngwlad:1  tan:1  ei:1  droed:1  ,:0 
Niver a sylabennow y'n linenn = 11

Linenn 16
Mae:1  hen:1  iaith:1  y:1  Cymry:2  mor:1  fyw:1  ag:1  erioed:2  ,:0 
Niver a sylabennow y'n linenn = 11

Linenn 17
Ni:1  luddiwyd:2  yr:1  awen:2  gan:1  erchyll:2  law:1  brad:1  ,:0 
Niver a sylabennow y'n linenn = 11

Linenn 18
Na:1  thelyn:2  berseiniol:3  fy:1  ngwlad:1  .:0 
Niver a sylabennow y'n linenn = 8


Selected words in long-form

python3 syllabenn_ranna_kw.py --fwd --cyregexp maehenwlad.txt | more
...
An ger yw: gwrol
Niver a syllabennow yw: 1
Hag yns i: ['gwrol']
S1: GWROL, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4
...
An ger yw: pleidiol
Niver a syllabennow yw: 2
Hag yns i: ['pleid', 'iol']
S1: PLEID, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: iol, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7
...

The word "gwrol" is assumed to have gwr as a consonant cluster, and is thus analysed as 1 syllable rather than 2 it has if w is pronounced as a vowel, which I is the correct Welsh pronunciation of this word, according to recordings of the Welsh national anthem.
Also, "pleidiol" is analysed as two syllables, interpreting the second i as a semi-vowel. It should really be 3 syllables, interpreting it as a vowel, i.e. ["pleid", "i", "ol"].

The Welsh syllable segmentation has a set of regular expressions defined for Welsh, and a subclass of the Syllabenn object, however the Ger object only has the special cases (of abnormal stress) defined for Cornish in the file datageryow.py so most abnormally stressed words will not be picked up.

Appendix, full output of Mae Hen Wlad Fy Nhadau:

python3 syllabenn_ranna_kw.py --fwd --cyregexp maehenwlad.txt
An ger yw: Mae
Niver a syllabennow yw: 1
Hag yns i: ['Mae']
S1: MAE, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: hen
Niver a syllabennow yw: 1
Hag yns i: ['hen']
S1: HEN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: wlad
Niver a syllabennow yw: 1
Hag yns i: ['wlad']
S1: WLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: fy
Niver a syllabennow yw: 1
Hag yns i: ['fy']
S1: FY, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: nhadau
Niver a syllabennow yw: 2
Hag yns i: ['nhad', 'au']
S1: NHAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: au, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5


An ger yw: yn
Niver a syllabennow yw: 1
Hag yns i: ['yn']
S1: YN, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: annwyl
Niver a syllabennow yw: 2
Hag yns i: ['ann', 'wyl']
S1: ANN, VC, hirder = [1, 1], hirder kowal = 2
S2: wyl, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 5


An ger yw: i
Niver a syllabennow yw: 1
Hag yns i: ['i']
S1: I, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: mi
Niver a syllabennow yw: 1
Hag yns i: ['mi']
S1: MI, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Gwlad
Niver a syllabennow yw: 1
Hag yns i: ['Gwlad']
S1: GWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: beirdd
Niver a syllabennow yw: 1
Hag yns i: ['beirdd']
S1: BEIRDD, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: a
Niver a syllabennow yw: 1
Hag yns i: ['a']
S1: a, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: chantorion
Niver a syllabennow yw: 3
Hag yns i: ['chant', 'or', 'ion']
S1: chant, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: OR, VC, hirder = [2, 1], hirder kowal = 3
S3: ion, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 9


An ger yw: enwogion
Niver a syllabennow yw: 3
Hag yns i: ['en', 'wog', 'ion']
S1: en, VC, hirder = [1, 1], hirder kowal = 2
S2: WOG, CVC, hirder = [1, 2, 1], hirder kowal = 4
S3: ion, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 9


An ger yw: o
Niver a syllabennow yw: 1
Hag yns i: ['o']
S1: O, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: fri
Niver a syllabennow yw: 1
Hag yns i: ['fri']
S1: FRI, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Ei
Niver a syllabennow yw: 1
Hag yns i: ['Ei']
S1: EI, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: gwrol
Niver a syllabennow yw: 1
Hag yns i: ['gwrol']
S1: GWROL, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: ryfelwyr
Niver a syllabennow yw: 3
Hag yns i: ['ryf', 'el', 'wyr']
S1: ryf, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: EL, VC, hirder = [2, 1], hirder kowal = 3
S3: wyr, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 9


An ger yw: gwladgarwyr
Niver a syllabennow yw: 3
Hag yns i: ['gwlad', 'gar', 'wyr']
S1: gwlad, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: GAR, CVC, hirder = [1, 2, 1], hirder kowal = 4
S3: wyr, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 10


An ger yw: tra
Niver a syllabennow yw: 1
Hag yns i: ['tra']
S1: TRA, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: mad
Niver a syllabennow yw: 1
Hag yns i: ['mad']
S1: MAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Dros
Niver a syllabennow yw: 1
Hag yns i: ['Dros']
S1: DROS, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: ryddid
Niver a syllabennow yw: 2
Hag yns i: ['rydd', 'id']
S1: RYDD, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: id, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: collasant
Niver a syllabennow yw: 3
Hag yns i: ['coll', 'as', 'ant']
S1: coll, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: AS, VC, hirder = [2, 1], hirder kowal = 3
S3: ant, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 8


An ger yw: eu
Niver a syllabennow yw: 1
Hag yns i: ['eu']
S1: EU, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: gwaed
Niver a syllabennow yw: 1
Hag yns i: ['gwaed']
S1: GWAED, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Gwlad
Niver a syllabennow yw: 1
Hag yns i: ['Gwlad']
S1: GWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: gwlad
Niver a syllabennow yw: 1
Hag yns i: ['gwlad']
S1: GWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: pleidiol
Niver a syllabennow yw: 2
Hag yns i: ['pleid', 'iol']
S1: PLEID, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: iol, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: wyf
Niver a syllabennow yw: 1
Hag yns i: ['wyf']
S1: WYF, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: i'm
Niver a syllabennow yw: 1
Hag yns i: ["i'm"]
S1: I'M, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: gwlad
Niver a syllabennow yw: 1
Hag yns i: ['gwlad']
S1: GWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Tra
Niver a syllabennow yw: 1
Hag yns i: ['Tra']
S1: TRA, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: môr
Niver a syllabennow yw: 1
Hag yns i: ['môr']
S1: MÔR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: yn
Niver a syllabennow yw: 1
Hag yns i: ['yn']
S1: YN, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: fur
Niver a syllabennow yw: 1
Hag yns i: ['fur']
S1: FUR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: i'r
Niver a syllabennow yw: 1
Hag yns i: ["i'r"]
S1: I'R, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: bur
Niver a syllabennow yw: 1
Hag yns i: ['bur']
S1: BUR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: hoff
Niver a syllabennow yw: 1
Hag yns i: ['hoff']
S1: HOFF, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: bau
Niver a syllabennow yw: 1
Hag yns i: ['bau']
S1: BAU, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: O
Niver a syllabennow yw: 1
Hag yns i: ['O']
S1: O, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: bydded
Niver a syllabennow yw: 2
Hag yns i: ['bydd', 'ed']
S1: BYDD, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ed, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: i'r
Niver a syllabennow yw: 1
Hag yns i: ["i'r"]
S1: I'R, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: hen
Niver a syllabennow yw: 1
Hag yns i: ['hen']
S1: HEN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: iaith
Niver a syllabennow yw: 1
Hag yns i: ['iaith']
S1: IAITH, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: barhau
Niver a syllabennow yw: 2
Hag yns i: ['bar', 'hau']
S1: BAR, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: hau, CV, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: Hen
Niver a syllabennow yw: 1
Hag yns i: ['Hen']
S1: HEN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Gymru
Niver a syllabennow yw: 2
Hag yns i: ['Gym', 'ru']
S1: GYM, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ru, CV, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: fynyddig
Niver a syllabennow yw: 3
Hag yns i: ['fyn', 'ydd', 'ig']
S1: fyn, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: YDD, VC, hirder = [2, 1], hirder kowal = 3
S3: ig, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 8


An ger yw: paradwys
Niver a syllabennow yw: 3
Hag yns i: ['par', 'ad', 'wys']
S1: par, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: AD, VC, hirder = [2, 1], hirder kowal = 3
S3: wys, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 9


An ger yw: y
Niver a syllabennow yw: 1
Hag yns i: ['y']
S1: y, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: bardd
Niver a syllabennow yw: 1
Hag yns i: ['bardd']
S1: BARDD, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Pob
Niver a syllabennow yw: 1
Hag yns i: ['Pob']
S1: POB, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: dyffryn
Niver a syllabennow yw: 2
Hag yns i: ['dyff', 'ryn']
S1: DYFF, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ryn, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: pob
Niver a syllabennow yw: 1
Hag yns i: ['pob']
S1: POB, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: clogwyn
Niver a syllabennow yw: 2
Hag yns i: ['clog', 'wyn']
S1: CLOG, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: wyn, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: i'm
Niver a syllabennow yw: 1
Hag yns i: ["i'm"]
S1: I'M, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: golwg
Niver a syllabennow yw: 2
Hag yns i: ['gol', 'wg']
S1: GOL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: wg, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: sydd
Niver a syllabennow yw: 1
Hag yns i: ['sydd']
S1: SYDD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: hardd
Niver a syllabennow yw: 1
Hag yns i: ['hardd']
S1: HARDD, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Trwy
Niver a syllabennow yw: 1
Hag yns i: ['Trwy']
S1: TRWY, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: deimlad
Niver a syllabennow yw: 2
Hag yns i: ['deim', 'lad']
S1: DEIM, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: lad, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: gwladgarol
Niver a syllabennow yw: 3
Hag yns i: ['gwlad', 'gar', 'ol']
S1: gwlad, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: GAR, CVC, hirder = [1, 2, 1], hirder kowal = 4
S3: ol, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 9


An ger yw: mor
Niver a syllabennow yw: 1
Hag yns i: ['mor']
S1: MOR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: swynol
Niver a syllabennow yw: 2
Hag yns i: ['swyn', 'ol']
S1: SWYN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ol, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: yw
Niver a syllabennow yw: 1
Hag yns i: ['yw']
S1: YW, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: si
Niver a syllabennow yw: 1
Hag yns i: ['si']
S1: SI, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Ei
Niver a syllabennow yw: 1
Hag yns i: ['Ei']
S1: EI, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: nentydd
Niver a syllabennow yw: 2
Hag yns i: ['nent', 'ydd']
S1: NENT, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: ydd, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5


An ger yw: afonydd
Niver a syllabennow yw: 3
Hag yns i: ['af', 'on', 'ydd']
S1: af, VC, hirder = [1, 1], hirder kowal = 2
S2: ON, VC, hirder = [2, 1], hirder kowal = 3
S3: ydd, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 7


An ger yw: i
Niver a syllabennow yw: 1
Hag yns i: ['i']
S1: I, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: mi
Niver a syllabennow yw: 1
Hag yns i: ['mi']
S1: MI, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: Os
Niver a syllabennow yw: 1
Hag yns i: ['Os']
S1: OS, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: treisiodd
Niver a syllabennow yw: 2
Hag yns i: ['treis', 'iodd']
S1: TREIS, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: iodd, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: y
Niver a syllabennow yw: 1
Hag yns i: ['y']
S1: y, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: gelyn
Niver a syllabennow yw: 2
Hag yns i: ['gel', 'yn']
S1: GEL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: yn, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: fy
Niver a syllabennow yw: 1
Hag yns i: ['fy']
S1: FY, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: ngwlad
Niver a syllabennow yw: 1
Hag yns i: ['ngwlad']
S1: NGWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: tan
Niver a syllabennow yw: 1
Hag yns i: ['tan']
S1: TAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: ei
Niver a syllabennow yw: 1
Hag yns i: ['ei']
S1: EI, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: droed
Niver a syllabennow yw: 1
Hag yns i: ['droed']
S1: DROED, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Mae
Niver a syllabennow yw: 1
Hag yns i: ['Mae']
S1: MAE, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: hen
Niver a syllabennow yw: 1
Hag yns i: ['hen']
S1: HEN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: iaith
Niver a syllabennow yw: 1
Hag yns i: ['iaith']
S1: IAITH, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: y
Niver a syllabennow yw: 1
Hag yns i: ['y']
S1: y, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2


An ger yw: Cymry
Niver a syllabennow yw: 2
Hag yns i: ['Cym', 'ry']
S1: CYM, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ry, CV, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: mor
Niver a syllabennow yw: 1
Hag yns i: ['mor']
S1: MOR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: fyw
Niver a syllabennow yw: 1
Hag yns i: ['fyw']
S1: FYW, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: ag
Niver a syllabennow yw: 1
Hag yns i: ['ag']
S1: AG, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: erioed
Niver a syllabennow yw: 2
Hag yns i: ['er', 'ioed']
S1: ER, VC, hirder = [2, 1], hirder kowal = 3
S2: ioed, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 6


An ger yw: Ni
Niver a syllabennow yw: 1
Hag yns i: ['Ni']
S1: NI, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: luddiwyd
Niver a syllabennow yw: 2
Hag yns i: ['ludd', 'iwyd']
S1: LUDD, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: iwyd, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7


An ger yw: yr
Niver a syllabennow yw: 1
Hag yns i: ['yr']
S1: YR, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: awen
Niver a syllabennow yw: 2
Hag yns i: ['aw', 'en']
S1: AW, V, hirder = [2], hirder kowal = 2
S2: en, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 4


An ger yw: gan
Niver a syllabennow yw: 1
Hag yns i: ['gan']
S1: GAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: erchyll
Niver a syllabennow yw: 2
Hag yns i: ['erch', 'yll']
S1: ERCH, VC, hirder = [1, 1], hirder kowal = 2
S2: yll, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 4


An ger yw: law
Niver a syllabennow yw: 1
Hag yns i: ['law']
S1: LAW, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: brad
Niver a syllabennow yw: 1
Hag yns i: ['brad']
S1: BRAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4


An ger yw: Na
Niver a syllabennow yw: 1
Hag yns i: ['Na']
S1: Na, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: thelyn
Niver a syllabennow yw: 2
Hag yns i: ['thel', 'yn']
S1: THEL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: yn, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6


An ger yw: berseiniol
Niver a syllabennow yw: 3
Hag yns i: ['bers', 'ein', 'iol']
S1: bers, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: EIN, VC, hirder = [2, 1], hirder kowal = 3
S3: iol, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 9


An ger yw: fy
Niver a syllabennow yw: 1
Hag yns i: ['fy']
S1: FY, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3


An ger yw: ngwlad
Niver a syllabennow yw: 1
Hag yns i: ['ngwlad']
S1: NGWLAD, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

Friday, 17 March 2017

Syllable segmentation now available for Standard Written Form Cornish

I have done some more work on the syllable segmentation module of my taklow-kernewek Python software.

I have added regular expressions to process text in the Standard Written Form of Cornish. These are still under testing and may not correctly process all SWF words.

It looks to me like the SWF specification is not currently available at the Cornish Language Office website, it was accessible via the MAGA website which now redirects to the Cornish Language Office, which doesn't appear to link to the SWF specification PDF.

However it is online here: http://kernowek.net/Specification_Final_Version.pdf and the 2014 revisions are here: https://www.cornwall.gov.uk/media/21486879/swf-review-board-final-report.pdf. The SWF dictionary can be accessed as a PDF (pre-revision spelling) or as a website www.cornishdictionary.org.uk, which will soon be revised by Akademi Kernewek.

Peter Jenkin has recently produced some translations of some Welsh songs into Cornish, in FSS Traditional, which I have used to test my new regular expressions.

As an example, this is the translation of Calon Lân (Colon Lan):

Counting number of syllables per word and in each line. "Tecca" should be spelt "Tecka" I believe which will be recognised as 2 syllables, "Precyous" is 2 syllables in the output reproduced at the end of this post. This screenshot was taken before 'cy' was added as a consonant (used in FSS in place of KK 'sh') in the FSS regular expressions.
Full syllable details. The syllable parts have lengths of either 1 (short) or 2 (long) in FSS rather than 1 (short), 2 (half-long vowel / gemminated consonant), 3 (long vowel) in Kemmyn.

The original text in Welsh is:


Calon lân yn llawn daioni,
Tecach yw na'r lili dlos:
Dim ond calon lân all ganu
Canu'r dydd a chanu'r nos.
Nid wy'n gofyn bywyd moethus,
Aur y byd na'i berlau mân:
Gofyn wyf am galon hapus,
Calon onest, calon lân.

Pe dymunwn olud bydol,
Hedyn buan ganddo sydd;
Golud calon lân, rinweddol,
Yn dwyn bythol elw fydd.

Hwyr a bore fy nymuniad 
Gwyd i'r nef ar adain cân
Ar i Dduw, er mwyn fy Ngheidwad,
Roddi i mi galon lân.
with Peter Jenkin's Cornish translation:

Colon lan yw leun a dhadder,
Tecca es lili precyous:
Ny yll saw colon lan cana -
Cana'n jydh ha cana'n nos.

1. Ny wovynnav bewnans pur es,
Owr an bys na'y berlys mann:
Govyn a wrav colon attes,
Colon onest, colon lan.
   
2. Pythow an bys ma, mar mynnen,
Dhe hasen uskis galsa va;
Lanow colon lan yw prest len
A brenvyth prow bynytha.
   
3. Gorthugher, myttin ow mynnas
A neyj war eskelly can -
Troha Duw, a-barth ow Gwithyas,
A ro dhymmo colon lan.


The output showing the number of syllables in each line is:

Colon:2  lan:1  yw:1  leun:1  a:1  dhadder:2  ,:0 
Niver a sylabennow y'n linenn = 8

Tecca:1  es:1  lili:2  precyous:2  ::0 
Niver a sylabennow y'n linenn = 6

Ny:1  yll:1  saw:1  colon:2  lan:1  cana:2  -:0 
Niver a sylabennow y'n linenn = 8

Cana'n:2  jydh:1  ha:1  cana'n:2  nos:1  .:0 
Niver a sylabennow y'n linenn = 7


Niver a sylabennow y'n linenn = 0

1:0  .:0  Ny:1  wovynnav:3  bewnans:2  pur:1  es:1  ,:0 
Niver a sylabennow y'n linenn = 8

Owr:1  an:1  bys:1  na'y:1  berlys:2  mann:1  ::0 
Niver a sylabennow y'n linenn = 7

Govyn:2  a:1  wrav:1  colon:2  attes:2  ,:0 
Niver a sylabennow y'n linenn = 8

Colon:2  onest:2  ,:0  colon:2  lan:1  .:0 
Niver a sylabennow y'n linenn = 7


Niver a sylabennow y'n linenn = 0

2:0  .:0  Pythow:2  an:1  bys:1  ma:1  ,:0  mar:1  mynnen:2  ,:0 
Niver a sylabennow y'n linenn = 8

Dhe:1  hasen:2  uskis:2  galsa:2  va:1  ;:0 
Niver a sylabennow y'n linenn = 8

Lanow:2  colon:2  lan:1  yw:1  prest:1  len:1 
Niver a sylabennow y'n linenn = 8

A:1  brenvyth:2  prow:1  bynytha:3  .:0 
Niver a sylabennow y'n linenn = 7


Niver a sylabennow y'n linenn = 0

3:0  .:0  Gorthugher:3  ,:0  myttin:2  ow:1  mynnas:2 
Niver a sylabennow y'n linenn = 8

A:1  neyj:1  war:1  eskelly:3  can:1  -:0 
Niver a sylabennow y'n linenn = 7

Troha:2  Duw:1  ,:0  a-barth:2  ow:1  Gwithyas:2  ,:0 
Niver a sylabennow y'n linenn = 8

A:1  ro:1  dhymmo:2  colon:2  lan:1  .:0 
Niver a sylabennow y'n linenn = 7

The word "Tecca" should probably be written "Tecka" in SWF/T, where it will have 2 syllables.

The long-form output showing syllable details is shown below. The lengths of vowels are either long (written as 2 units here) or short (1) in the Standard Written Form, rather than long being 3, half-long 2 and short 1 as in Kemmyn.

An ger yw: Colon
Niver a syllabennow yw: 2
Hag yns i: ['Col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: lan
Niver a syllabennow yw: 1
Hag yns i: ['lan']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: yw
Niver a syllabennow yw: 1
Hag yns i: ['yw']
S1: YW, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: leun
Niver a syllabennow yw: 1
Hag yns i: ['leun']
S1: LEUN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: a
Niver a syllabennow yw: 1
Hag yns i: ['a']
S1: a, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: dhadder
Niver a syllabennow yw: 2
Hag yns i: ['dhadd', 'er']
S1: DHADD, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: er, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: Tecca
Niver a syllabennow yw: 1
Hag yns i: ['Te']
S1: TE, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: es
Niver a syllabennow yw: 1
Hag yns i: ['es']
S1: ES, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: lili
Niver a syllabennow yw: 2
Hag yns i: ['lil', 'i']
S1: LIL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: i, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5

An ger yw: precyous
Niver a syllabennow yw: 2
Hag yns i: ['precy', 'ous']
S1: PRECY, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ous, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: Ny
Niver a syllabennow yw: 1
Hag yns i: ['Ny']
S1: Ny, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: yll
Niver a syllabennow yw: 1
Hag yns i: ['yll']
S1: YLL, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: saw
Niver a syllabennow yw: 1
Hag yns i: ['saw']
S1: SAW, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: colon
Niver a syllabennow yw: 2
Hag yns i: ['col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: lan
Niver a syllabennow yw: 1
Hag yns i: ['lan']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: cana
Niver a syllabennow yw: 2
Hag yns i: ['can', 'a']
S1: CAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: a, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5

An ger yw: Cana'n
Niver a syllabennow yw: 2
Hag yns i: ['Can', "a'n"]
S1: CAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: a'n, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: jydh
Niver a syllabennow yw: 1
Hag yns i: ['jydh']
S1: JYDH, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: ha
Niver a syllabennow yw: 1
Hag yns i: ['ha']
S1: ha, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: cana'n
Niver a syllabennow yw: 2
Hag yns i: ['can', "a'n"]
S1: CAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: a'n, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: nos
Niver a syllabennow yw: 1
Hag yns i: ['nos']
S1: NOS, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: 1
Niver a syllabennow yw: 0
Hag yns i: []
Hirder ger kowal = 0

An ger yw: Ny
Niver a syllabennow yw: 1
Hag yns i: ['Ny']
S1: Ny, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: wovynnav
Niver a syllabennow yw: 3
Hag yns i: ['wov', 'ynn', 'av']
S1: wov, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: YNN, VC, hirder = [1, 1], hirder kowal = 2
S3: av, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 7

An ger yw: bewnans
Niver a syllabennow yw: 2
Hag yns i: ['bewn', 'ans']
S1: BEWN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ans, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: pur
Niver a syllabennow yw: 1
Hag yns i: ['pur']
S1: PUR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: es
Niver a syllabennow yw: 1
Hag yns i: ['es']
S1: ES, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: Owr
Niver a syllabennow yw: 1
Hag yns i: ['Owr']
S1: OWR, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: an
Niver a syllabennow yw: 1
Hag yns i: ['an']
S1: an, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: bys
Niver a syllabennow yw: 1
Hag yns i: ['bys']
S1: BYS, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: na'y
Niver a syllabennow yw: 1
Hag yns i: ["na'y"]
S1: NA'Y, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: berlys
Niver a syllabennow yw: 2
Hag yns i: ['berl', 'ys']
S1: BERL, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: ys, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: mann
Niver a syllabennow yw: 1
Hag yns i: ['mann']
S1: MANN, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: Govyn
Niver a syllabennow yw: 2
Hag yns i: ['Gov', 'yn']
S1: GOV, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: yn, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: a
Niver a syllabennow yw: 1
Hag yns i: ['a']
S1: a, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: wrav
Niver a syllabennow yw: 1
Hag yns i: ['wrav']
S1: WRAV, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: colon
Niver a syllabennow yw: 2
Hag yns i: ['col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: attes
Niver a syllabennow yw: 2
Hag yns i: ['att', 'es']
S1: ATT, VC, hirder = [1, 1], hirder kowal = 2
S2: es, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 4

An ger yw: Colon
Niver a syllabennow yw: 2
Hag yns i: ['Col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: onest
Niver a syllabennow yw: 2
Hag yns i: ['on', 'est']
S1: ON, VC, hirder = [2, 1], hirder kowal = 3
S2: est, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: colon
Niver a syllabennow yw: 2
Hag yns i: ['col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: lan
Niver a syllabennow yw: 1
Hag yns i: ['lan']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: 2
Niver a syllabennow yw: 0
Hag yns i: []
Hirder ger kowal = 0

An ger yw: Pythow
Niver a syllabennow yw: 2
Hag yns i: ['Pyth', 'ow']
S1: PYTH, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ow, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5

An ger yw: an
Niver a syllabennow yw: 1
Hag yns i: ['an']
S1: an, VC, hirder = [2, 1], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: bys
Niver a syllabennow yw: 1
Hag yns i: ['bys']
S1: BYS, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: ma
Niver a syllabennow yw: 1
Hag yns i: ['ma']
S1: ma, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: mar
Niver a syllabennow yw: 1
Hag yns i: ['mar']
S1: mar, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: mynnen
Niver a syllabennow yw: 2
Hag yns i: ['mynn', 'en']
S1: MYNN, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: en, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: Dhe
Niver a syllabennow yw: 1
Hag yns i: ['Dhe']
S1: Dhe, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: hasen
Niver a syllabennow yw: 2
Hag yns i: ['has', 'en']
S1: HAS, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: en, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: uskis
Niver a syllabennow yw: 2
Hag yns i: ['usk', 'is']
S1: USK, VC, hirder = [2, 1], hirder kowal = 3
S2: is, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: galsa
Niver a syllabennow yw: 2
Hag yns i: ['gals', 'a']
S1: GALS, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: a, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 4

An ger yw: va
Niver a syllabennow yw: 1
Hag yns i: ['va']
S1: VA, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: Lanow
Niver a syllabennow yw: 2
Hag yns i: ['Lan', 'ow']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: ow, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5

An ger yw: colon
Niver a syllabennow yw: 2
Hag yns i: ['col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: lan
Niver a syllabennow yw: 1
Hag yns i: ['lan']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: yw
Niver a syllabennow yw: 1
Hag yns i: ['yw']
S1: YW, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: prest
Niver a syllabennow yw: 1
Hag yns i: ['prest']
S1: PREST, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: len
Niver a syllabennow yw: 1
Hag yns i: ['len']
S1: LEN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: A
Niver a syllabennow yw: 1
Hag yns i: ['A']
S1: A, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: brenvyth
Niver a syllabennow yw: 2
Hag yns i: ['bren', 'vyth']
S1: BREN, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: vyth, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7

An ger yw: prow
Niver a syllabennow yw: 1
Hag yns i: ['prow']
S1: PROW, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: bynytha
Niver a syllabennow yw: 3
Hag yns i: ['byn', 'yth', 'a']
S1: byn, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: YTH, VC, hirder = [2, 1], hirder kowal = 3
S3: a, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 7

An ger yw: 3
Niver a syllabennow yw: 0
Hag yns i: []
Hirder ger kowal = 0

An ger yw: Gorthugher
Niver a syllabennow yw: 3
Hag yns i: ['Gorth', 'ugh', 'er']
S1: Gorth, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: UGH, VC, hirder = [2, 1], hirder kowal = 3
S3: er, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 8

An ger yw: myttin
Niver a syllabennow yw: 2
Hag yns i: ['mytt', 'in']
S1: MYTT, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: in, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: ow
Niver a syllabennow yw: 1
Hag yns i: ['ow']
S1: ow, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: mynnas
Niver a syllabennow yw: 2
Hag yns i: ['mynn', 'as']
S1: MYNN, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: as, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: A
Niver a syllabennow yw: 1
Hag yns i: ['A']
S1: A, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: neyj
Niver a syllabennow yw: 1
Hag yns i: ['neyj']
S1: NEYJ, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: war
Niver a syllabennow yw: 1
Hag yns i: ['war']
S1: WAR, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: eskelly
Niver a syllabennow yw: 3
Hag yns i: ['esk', 'ell', 'y']
S1: esk, VC, hirder = [1, 1], hirder kowal = 2
S2: ELL, VC, hirder = [1, 1], hirder kowal = 2
S3: y, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 5

An ger yw: can
Niver a syllabennow yw: 1
Hag yns i: ['can']
S1: CAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4

An ger yw: Troha
Niver a syllabennow yw: 2
Hag yns i: ['Tro', 'ha']
S1: TRO, CV, hirder = [1, 2], hirder kowal = 3
S2: ha, CV, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 5

An ger yw: Duw
Niver a syllabennow yw: 1
Hag yns i: ['Duw']
S1: DUW, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: a-barth
Niver a syllabennow yw: 2
Hag yns i: ['a-', 'barth']
S1: A-, V, hirder = [2], hirder kowal = 2
S2: barth, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 5

An ger yw: ow
Niver a syllabennow yw: 1
Hag yns i: ['ow']
S1: ow, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: Gwithyas
Niver a syllabennow yw: 2
Hag yns i: ['Gwith', 'yas']
S1: GWITH, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: yas, CVC, hirder = [1, 1, 1], hirder kowal = 3
Hirder ger kowal = 7

An ger yw: A
Niver a syllabennow yw: 1
Hag yns i: ['A']
S1: A, V, hirder = [2], hirder kowal = 2
Hirder ger kowal = 2

An ger yw: ro
Niver a syllabennow yw: 1
Hag yns i: ['ro']
S1: RO, CV, hirder = [1, 2], hirder kowal = 3
Hirder ger kowal = 3

An ger yw: dhymmo
Niver a syllabennow yw: 2
Hag yns i: ['dhymm', 'o']
S1: DHYMM, CVC, hirder = [1, 1, 1], hirder kowal = 3
S2: o, V, hirder = [1], hirder kowal = 1
Hirder ger kowal = 4

An ger yw: colon
Niver a syllabennow yw: 2
Hag yns i: ['col', 'on']
S1: COL, CVC, hirder = [1, 2, 1], hirder kowal = 4
S2: on, VC, hirder = [1, 1], hirder kowal = 2
Hirder ger kowal = 6

An ger yw: lan
Niver a syllabennow yw: 1
Hag yns i: ['lan']
S1: LAN, CVC, hirder = [1, 2, 1], hirder kowal = 4
Hirder ger kowal = 4





Sunday, 22 January 2017

Data visualization of Aberystwyth Shipping Records

In a previous post, I described the shipping records for vessels registered at the port of Aberystwyth, transcribed by volunteers and released in digital form by the National Library of Wales.

I have used openpyxl to read the files (released as Excel spreadsheets) in Python. I have uploaded the code at bitbucket.org/davidtreth/aberystwythships (the data itself should be downloaded from the National Library of Wales site).

I have uploaded results at taklowkernewek.neocities.org/abership and have recently extended this to include plots made using matplotlib, which are presented below (and will be put up in some form at the neocities page soon).

The earliest and latest dates recorded for each vessel.

The joining and leaving dates for every mariner recorded (who has parsable dates)

An example vessel.

Another example vessel

Another example vessel








Thursday, 19 January 2017

Can Y Cardi re-released for President Dukat inaugurization

President Dukat is inaugurized today. The Dukat-Brunt team encourage all citizens of the galaxy to celebrate with this new version of Can Y Cardi (The Cardi Song).









Earth's political crisis continues after the planet voted to leave the United Federation of Planets in a recent referendum.

The Prime Minister of Earth, Tresera June still maintains that the planet will not only press ahead with plans to leave the Federation, but leave the UFP single market. The Romulan government is expecting this may give an opportunity to bring an end to trade sanctions imposed by the Federation after the Romulan annexation of two star systems in the Neutral Zone. This could even lead to the legalisation of Romulan Ale on Earth. However this would mean a hard border with Mars and its dependent asteroid colonies which will be remaining in the Federation, and the possibility of another independence referendum on Luna.

Tuesday, 17 January 2017

Aberystwyth Shipping Records transcribed by the National Library of Wales

The National Library of Wales (Llyfrgell Genedlaethol Cymru) has published data of shipping records consisting of crew lists of vessels registered at the port of Aberystwyth from 1856-1914. Dolen Cymraeg.

These consist of a large number of Excel files, and I have written a Python program to read these in, using openpyxl.

There are over 500 vessels recorded, which can have more than one Excel file of records each, which itself can have more than one worksheet tab. However the format is quite consistent, so it is possible to read them programatically with nested loops.
I have uploaded the code at Bitbucket: bitbucket.org/davidtreth/aberystwythships.

Update 

I have uploaded the full details at my website: taklowkernewek.neocities.org/abership.

Extract of some of the output, listing the ship names.


The program takes the first spreadsheet for each "Series" (1 series for each vessel), and takes the name from that, and then finds if there is any name conflict. Occasionally the name is spelled differently, etc.

$ python abership.py -cv
when -v is selected, it uses verbose mode which includes additional print() lines that here show which files are being read.

-c checks the ship names, and the registry numbers for discrpeancies within each series.

Yn ddarllen y data
Reading Data
Directory: Series 1 - 10
Directory: Series_1_vtls004566957
File: File_1-1_vtls004583057.xlsx
Sheet: 1-1-1
File: File_1-2_vtls004583119.xlsx
Sheet: 1-2-1
File: File_1-3_vtls004583238.xlsx
Sheet: 1-3-1
Sheet: 1-3-2
File: File_1-4_vtls004583279.xlsx
Sheet: 1-4-1
Sheet: 1-4-2
Sheet: 1-4-3
Sheet: 1-4-4
File: File_1-5_vtls004583314.xlsx
Sheet: 1-5-1
Sheet: 1-5-2
Sheet: 1-5-3
File: File_1-6_vtls004583549.xlsx
Sheet: 1-6-1
Sheet: 1-6-2
File: File_1-7_vtls004583627.xlsx
Sheet: 1-7-1
Sheet: 1-7-2
Sheet: 1-7-3
File: File_1-8_vtls004583639.xlsx
Sheet: 1-8-1
Sheet: 1-8-2
Sheet: 1-8-3
File: File_1-9_vtls004583649.xlsx
Sheet: 1-9-1
Sheet: 1-9-2
File: File_1-10_vtls004583662.xlsx
Sheet: 1-10-1
Sheet: 1-10-2
File: File_1-11_vtls004583696.xlsx
Sheet: 1-11-1
Sheet: 1-11-2
File: File_1-12_vtls004583787.xlsx
Sheet: 1-12-1
Sheet: 1-12-2
Sheet: 1-12-3
Sheet: 1-12-4
File: File_1-13_vtls004583837.xlsx
Sheet: 1-13-1
Directory: Series_2_vtls004566962
File: File_2-1_vtls004584143.xlsx
Sheet: 2-1-1
File: File_2-2_vtls004584274.xlsx
Sheet: 2-2-1
Sheet: 2-2-2
Sheet: 2-2-3

rest of this part of the output skipped, and report the total number of Excel files read, and the number of vessels.

Total number of Excel files = 5687
Number of vessels = 544

Vessel names:
Aberystwyth, Acorn, Active, Ada Letitia, Ada & Alice, Adela S. Hills, Adelaide, Adoram, Adrienne, Adroit, Advance, Aeron Belle, Aeron Lass, Aeron Maid, Aeron Queen, Aeron Vale, Affines, Agenoria, Agenoria, Agnes Cairnes, Agnes Fraser, Albatross, Alberta, Albion, Alert, Alert, Alice, Alice & Eliza, Alicia, All Right, Alton Towers, Amity, Ann, Ann, Ann Davies, Ann Eliza, Ann Jones, Ann & Betsy, Ann & Elizabeth, Ann & Margaret, Ann & Mary, Anna Maria, Anne, Anne Catherine, Anne Davies, Anne Elizabeth, Anne Jane, Anne Jenkins, Anne Jones, Anne Warren, Anne & Mary, Annie Maude, Annie Ramsay, Annsboro, Antelope, Arcturus, Aretas, Argo, Arica, Atalanta, Atlantic, Aurora, Azorean, Battus, Beatrice, Bee, Bee, Belem, Berlin, Bertie, Beryl, Bessie, Bezaleel, Birdoswald, Blue Jacket, Blue & White, Bodotria, Breconian, Bristol Packet, Bristol Trader, Britannia, Brothers, Brothers, Burncoose, Cadwgan, Cambria, Cambrian, Cambrian Belle, Camden, Candace, Candor, Capricorn, Caradog, Carn Brea, Caroline, Caroline Spooner, Carthusian, Castle, Castle Eden, Catherine, Catherine, Catherine, Catherine Anne, Catherine Hendry, Catherine Morgan, Catherine & Jane, Catherine & Mary , Cecil Brindley , Ceredig, Ceres, Ceres, Ceylon, Champion, Charlotte, Cheltonian, Clara, Clarissa, Clarita, Clarovine, Claudia, Claudia, Claverdale, Cliftonion, Comet, Confidence, Conovium, Conovium, Convoy, Countess of Lisburne, Countess of Lisburne, Courier, Credo, Crescent, Cricket, Crusader, Cwmsymlog, Cygnet, Dart, Derby, Desdemona, Dewi Lass, Diligence, Dora Ann, Doris, Dove, Dovey Belle, Dovey Packet, Dreadnought, Dreadnought, Drusus, Dudgeon, Eagle, Eagle Eyed, Eaglet, Eastward, Edith Eleanor, Edward John, Egeratea, Eigen, Eleanor, Eleanor, Eleanor Francis, Eleanor Thomas, Eleanor & Jane, Eleanor & Jane, Eliza Francis, Eliza Jane, Eliza Jenkins, Eliza & Hannah, Elizabeth, Elizabeth Ann, Elizabeth Davies, Elizabeth Jane, Elizabeth Lewis, Elizabeth Thomas, Elizabeth & Margaret, Ella, Ellen, Ellen, Ellen, Ellen, Ellen, Ellen Anne, Ellen Beatrice, Ellen Catherine, Ellen Edwards, Ellen Owen, Emily Agnes, Emma Alice, Emrys, Energy, Enterprise, Equity, Erycina, Ethel Anne, Etonian, Eugenia, Eunice, Excellent, Excelsior, Exchange, Express, Fair Hope, Fairlina, Fairy, Faithful Mother, Faithful Sister, Fanny Fothergill, Fanny Taylor, Farmers Lass, Favourite, Favourite, Feliciana, Firefly, Fleetwing, Florrie, Friends, Friendship, Gambia, General Nott, General Nott, General Picton, George, George Evans, George Reynolds, George & Lizzie, Gertrude, Gipsy King, Glad Tidings, Glanyrafon, Glanhafren, Glanrheidol, Glantivy, Glanwern, Glanystwyth, Glanystwyth, Gleaner, Glenara, Glenaros, Glenvech, Glynaeron, Gowerian, Gwalia, Gwladys, Hagar, Hannah, Harperly, Harrovian, Hawendale, Heart of Oak, Heather Bell, Hedessa, Heedful, Helena, Henry E. Taylor, Henry & Dora, Herald, Hero, Hetty Ellen, Hetty Mary, Hind, Honora, Hope, Hope, Hope, Ianthe, Idea, Ifor, Ina Lass, Industry, Industry, Integrity, Ionian Belle, Isabel, Isabella, Isobel, Ivanhoe, J. Llewellyn, J.W., J. W. A., James, Jane, Jane, Jane, Jane, Jane, Jane, Jane Davies, Jane Elizabeth, Jane Ellen, Jane Ellen, Jane Griffiths, Jane Gwynne, Jane Herbert, Jane Jones, Jane Maria, Jane Morgans, Jane Owens, Jane Rowland, Jane Williams, Jane & Mary, Joan Cunllo, Johann, John Elias, John Ewing, John James, John James, John Pierce, John William, John & Ann, John & Margaret, John & Mary, John & Mary, Jubilee, Julianna, Kate, Kate Sophia, Keldhead, Killia Lass, Lady Agnes, Lady of the Forest, Lady Pryse, Laura, Leah, Leander, Lerry, Letitia, Lettice Catherine, Levant, Levant, Lima, Lively Lass, Lizzie Jane, Lois, Lois, Lorne, Louisa Ann, Louisa Jane, Lovely Lass, Lovina, Loyalty, Lydia, Lynwood, M. A. Evans, M.A. Jones, Madona, Maelota, Magdalen Esther, Maggie Cummings, Maggie Phillips, Maglona, Maid of Meirion, Main, Mair, Majestic, Major Nanney, Malvina, Mantura, Margaret Ann, Margaret Evans, Margaret Jane, Margaret Jones, Margaretta, Margaretta, Maria, Maria, Maria Anna, Maria & Ann, Marmion, Martha Jane, Martha Lloyd, Martha Lloyd, Martha & Harriet , Martin, Marwood, Mary, Mary Anna, Mary Anne, Mary Botwood, Mary Davies, MARY & ELLEN, Mary Hughes, MARY JANE, Mary Jane, Mary Jones, Mary Lloyd, Mary Rees, Mary Sarah, Marys, Mediterranean, Mela, Melodia, Meridian, Messenger, Messenger, Miss Hughes, Montego, Morben, Morning Star, Morriston, Mountain Lass, Myra, Nanteos, Naomi, Naomi, Napoleon, Nathaniel, Native, Native Pearl, Nell, Nerissa, New Diligence, Nimrod, Nive, Noah, Norseman, Nymph, Nymph, Nymph, Ocean Belle, Ocean Dart, Omnibus, Oneida, Ontario, Orcadia, Orion, Oronsa, Ospray, Owny Belle, P. M. Willcock, Pacific, Padarn, Pandora, Panthea, Patriot, Pearl, Peerless, Perseverance, Philanthropist, Pilgrim, Pinedene, Pleiades, Plover, Pluvier, Porpoise, Prairie Flower, Prima, Prima Donia, PRIMROSE, Prince Cadwgan, Prince Llewelyn, Prince of Wales, Principality, Priscilla, Progress, Providence, Prudence, Puella, Pyrenee, Queen of the Isles, Queen's Cliff, Rachel Lewis, Raymond, Rebecca, Reform, Resolute, Resolven, Retina, Retriever, Rheidol, Rheidol Queen, Rheidol Vale, Roseina, Rosina, Rosland, Rowland Evans, Ruby, Rugbeian, Santon, Salathiel, Sarah, Sarah Ann, Sarah Bridget, Sarah Davies, Sarah Jane, Sarah Philips, Sarah & Mary, Sea Queen, Severn, Shon Quilt, Sir Robert McClure, Sisters, Solway, Sophia & Emily, Speculation, Speculation, Spread Eagle, Sqirrel, Star of Wales, Strata Florida, Strathisla, Summer Cloud, Susanna, Susanna Gwenllian, Susannah Knapp, Swallow, Swell, Sylph, Syren, Taliesin, Theodore Engels, Thomas, Thomas & Sons, Tirsah, Towy, Triton, Truant, Turtle Dove, Two Brothers, Two sisters, U. Larsing, Union Packet, Urania, Urgent, Utopia, Valentine, Velocity, Velocity, Venus, Victoria, Viscata, Volunteer, Walter J. Cummins, Wasp, Waterloo, Wellington, William Landreth, William & Mary, Xanthippe, Ystwyth, Zenobia, Zingara, Zouave, Zulette,

Aberystwyth : 30 worksheets
ship name conflict
Aberystwyth Aberystwyth SS
ship name conflict
Aberystwyth Aberystywyth
ship name conflict
Aberystwyth Aberystwth
Acorn : 92 worksheets
ship name conflict
Acorn None
Active : 38 worksheets
Ada Letitia : 12 worksheets
Ada & Alice : 35 worksheets
Adela S. Hills : 15 worksheets
ship name conflict
Adela S. Hills Adela S Hills
ship name conflict
Adela S. Hills Adela S Hills
ship name conflict
Adela S. Hills Adela S Hills
ship name conflict
Adela S. Hills Adela S Hills
Adelaide : 16 worksheets

etc. - if the name of the ship in some of the worksheets is different from the first one encountered, it will show this. It will also show if the ship registry number is not the same for the whole series.

Sea Queen : 12 worksheets
more than one ship registry number per series
[51148, 51148, 51148, 51148, 51448, 51148, 51148, 51148, 51148, 51148, 51148, 51148]

in this case one of these registry numbers has a typo 51448

Showing the crew lists

Another mode is to output the whole crew lists, which is done by
$ python abership.py -p

As an example:

Series 47. File name File_47-11_vtls004614858.xlsx. Sheet 47-11-1. Ship name: Anne Jane. Ship Registry Number: 42590 Port of registry: Aberystwyth

  • Name Birth Year Age Birthplace Date Joined Port Joined Capacity Date Left Port Left
  • Evan Davies blk 28 Aberystwith 1875-09-09 Falmouth Master blk blk
  • John Smith blk 44 Stonehouse 1875-09-09 Falmouth Mate 1876-01-15 Gloster
  • William Holiday blk 17 Manchester 1875-09-09 Falmouth Cook & Ordinary Seaman 1876-01-15 Gloster
  • Patrick Driscoll blk 34 [Queenstown] 1875-09-10 Plymouth Able Seaman 1876-01-15 Gloster
  • Jacob Jonsen blk 21 Norway 1875-09-10 Plymouth Able Seaman 1875-09-21 At Sea
  • Alexander Johnson blk 22 Jersey 1875-09-11 Falmouth Able Seaman 1876-01-15 Gloster
  • William Trewin blk 19 Truro 1875-09-11 Falmouth Ordinary Seaman 1876-01-15 Gloster
  • William Golley blk 20 Peel 1875-10-25 Seville Ordinary Seaman 1876-01-15 Gloster

Checking the dates

It is also possible to check the dates, which if they are before 1850 or after 1920 the program will report it.

$ python abership -d

Example output

Series 511. Vessel Name, ID: Theodore Engels 85272
File File_511-1_vtls004969330.xlsx. Sheet 511-1-1
Date 1982-08-29 falls before 1850 or after 1920.
Date 1982-08-29 falls before 1850 or after 1920.
File File_511-1_vtls004969330.xlsx. Sheet 511-1-2
File File_511-2_vtls004969335.xlsx. Sheet 511-2-2
File File_511-2_vtls004969335.xlsx. Sheet 511-2-3
File File_511-2_vtls004969335.xlsx. Sheet 511-2-1
date string that cannot be processed: Continues
date string that cannot be processed: 1896--05-28
date string that cannot be processed: 1896--05-28
File File_511-3_vtls004969400.xlsx. Sheet 511-3-3
File File_511-3_vtls004969400.xlsx. Sheet 511-3-2
File File_511-3_vtls004969400.xlsx. Sheet 511-3-1
Vessel Name, ID, Dates: Theodore Engels, 85272, 1892-06-04, 1898-04-19

This finds the earliest and latest dates found for that vessel, and reports any strings that do not appear to be a date, or are outside the expected time bounds.

Redirecting to command-line

Using the Linux command line, it is possible to redirect the output of the print() statements, to a text file, e.g.
$ python -p abership.py > aberships_all.txt

After this, the file could be opened in a text editor, or searched for substrings at the command-line using grep.

grep -C 5 Truro aberships_all.txt


finds all rows of the output, either where a mariner was born in Truro, or joined or left it in Truro.

as an example:

Series 389. File name File_389-19_vtls004926403.xlsx. Sheet 398-19-1. Ship name: Marys. Ship Registry Number: 13154 Port of registry: Aberystwyth

  • Name Birth Year Age Birthplace Date Joined Port Joined Capacity Date Left Port Left
  • George Harvey 1848 blk Padstow 1886-01-01 Truro Master remains blk
  • James Pinch 1860 blk Padstow 1886-01-01 Truro Mate 1886-03-12 Waterford
  • Joshua Rowe 1860 blk Padstow 1886-01-01 Truro Able Seaman 1886-02-11 Padstow
  • Charles Condon 1830 blk St Johns [New Brunswick] 1886-02-11 Padstow Able Seaman 1886-04-22 Pentewan
  • Michael Marrison 1862 blk Waterford 1886-03-12 Waterford Able Seaman 1886-05-19 Runcorn
  • John Pellow 1853 blk Hayle 1886-05-30 Runcorn Able Seaman 1886-06-10 Hayle
  • Daniel Rion 1846 blk Clonakilty 1886-05-30 Runcorn Mate blk blk
  • Harry Harvey 1872 blk Padstow 1886-01-01 Truro Boy blk blk