Z-base – a first look at Source tags

This note is really an adjunct to an on-going discussion over at <CG>, in the <chessgames> forum. The discussion concerns how <CG> is going to implement Source references. I could mirror the discussion here, but let me just give a link where you can pick up the thread:

http://www.chessgames.com/perl/kibitzing?kid=U1&reply=24784

And here is a list of actual Source tags that I use in Z-base, where the length is greater than 40 characters:

Report of the Annual Meeting of the Chess Association, Manchester (1857) p25/28
Report of the Annual Meeting of the Chess Association - Manchester (1857) p26/29
Report of the Annual Meeting of the Chess Association - Manchester (1857) p28/31
Report of the Annual Meeting of the Chess Association - Manchester (1857) p38/41 ff
Report of the Annual Meeting of the Chess Association - Manchester (1857) p28/31
Report of the Annual Meeting of the Chess Association - Manchester (1857) p30/33
Report of the Annual Meeting of the Chess Association - Manchester (1857) p8/11
Chess Player's Chronicle v1 S3 (1859) p17 ff p20
New York Albion 1867-10-12 / O'Keefe Timeline
Harding - Blackburne / The Field 10 Aug 1872
Brooklyn Chess Chronicle (Oct 1886-Sept 1887) p168 Game 426
Davies - Lipschutz p29 Game 16 / Daily News 1886-07-13 / NYT 1886-07-25 etc
Chess Players Chronicle 1st Sept 1886 p36 Game 1594 / International Chess Magazine
Brooklyn Chess Chronicle (Oct 1886-Sept 1887) p167 Game 425
DSZ v41-42 p268 Game 4908 from A. de Riviere's 'L'Evenement'
CG/Game CCCCLIII, BCM v6-7 (Aug-Sep 1886) p325/cf Harding Blackburne p231
Chess Monthly v7 (Sept 1885-Aug 1886) p360 Game 705
Chess Monthly v7 (Sept 1885-Aug 1886) p297 Game 684
Game CCCCLV, BCM v6-7 (Aug-Sep 1886) p329
Brooklyn Chess Chronicle (Oct 1886-Sept 1887) p169 Game 428
Chess Players Chronicle 8th Sept 1886 p45 Game 1600 / Field
Game CCCCXLIX, BCM v6-7 (Aug-Sep 1886) p319
Brooklyn Chess Chronicle (Oct 1886-Sept 1887) p169 Game 427
Harding non-reconstruction - Blackburn p232 Game 481 / London 1886-07 p38-39 / Graham #125
Davies - Lipschutz p32 Game 19 / NY Times 1886-07-17
Chess Monthly v7 (Sept 1885-Aug 1886) p303 Game 688
Chess Monthly v7 (Sept 1885-Aug 1886) p363 Game 706
Brooklyn Chess Chronicle v4 (Oct 1886-Sept 1887) p166 Game 423
BCM v6 p346 (incomplete fragment, diagram right)
CG / Harding - Blackburn p232 Game 483 / T.C.M., VIII p48-49 / Graham #226
Chess Monthly v8 (Sept 1886-Aug 1887) p47 Game 726
Brooklyn Chess Chronicle v4 (Oct 1886-Sept 1887) p166 Game 424
Chess Players Chronicle 8th Sept 1886 p48 Game 1602
Chess Monthly v8 (Sept 1886-Aug 1885) p50 Game 728
BCM v6-7 (Aug-Sep 1886) p345 (fragment from diagram right)
Game CCCCLII, BCM v6-7 (Aug-Sep 1886) p324
Game CCCCLVIII, BCM v6-7 (Aug-Sep 1886) p333 / cf Davies Lipschutz p35
Chess Monthly v8 (Sept 1886-Aug 1885) p51 Game 729
Game CCCCLI, BCM v6-7 (Aug-Sep 1886) p322
Chess Players Chronicle 8th Sept 1886 p45 Game 1599 / Field
Game CCCCLIX, BCM v6-7 (Aug-Sep 1886) p335
Chess Monthly v8 (Sept 1886-Aug 1885) p10 Game 715
CG / Chess Monthly v7 (Sept 1885-Aug 1886) p365 Game 708
Chess Monthly v7 (Sept 1885-Aug 1886) p368 Game 709
BCM v6 p358 (incomplete fragment, diagram)
Chess Players Chronicle 8th Sept 1886 p47 Game 1601 / Standard
BCM v6 p358 (incomplete fragment, diagram right)
Chess Monthly v7 (Sept 1885-Aug 1886) p372 Game 711
Chess Monthly v7 (Sept 1885-Aug 1886) p373 Game 712
Chess Players Chronicle 1st Sept 1886 p37 Game 1595 / Standard
Chess Monthly v7 (Sept 1885-Aug 1886) p374 Game 713
Chess Monthly v8 (Sept 1886-Aug 1885) p12 Game 716
CG / Game CCCCLVII, BCM v6-7 (Aug-Sep 1886) p332 / Date from Harding's Blackburne p234
Game CCCCLVI, BCM v6-7 (Aug-Sep 1886) p330

Here are a couple of lines of python-codeĀ used to produce the above:

C:\...\Z-base> py

>>> import PGN
>>> P = PGN.load( "Z-base.pgn" )
>>> for s in [ p.Source for p in P if "Source" in p.__dict__ and len( p.Source ) > 40 ]: print s

And here is the code again, with elaborate comments:

C:\...\Z-base> py

>>> import PGN
>>> P = PGN.load( "Z-base.pgn" )

# How many games in Z-base?
>>> len(P)
1784

# Fill array, S, of Sourced games.
# One-step alternative: S = [ p for p in P if 'Source' in p.__dict__ ]
>>> for p in P:
        try:
                S.append( p.Source )
        except:
                pass

# How many games in Z-base are Sourced?
>>> len(S)
424

# What is the longest Source record?
>>> max( [ len(s) for s in S ] )
90

# How many Source records over 40 characters?
>>> SL = [ s for s in S if len(s) > 40 ]
>>> len( SL )
54

# Let's have a look.
>>> for s in SL: print s

# List omitted, see above.


 

zz

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s