Next / Previous / Contents / Shipman's homepage

Table of Contents

1. Introduction
1.1. How to get this publication
2. txny_schema.py: Python declarations for the schema
3. The txny.py module: prologue
4. class Txny
4.1. Txny.genAbbrs(): Generate all valid bird codes
4.2. Txny.genTxKeys(): Generate all phylogenetic key numbers
4.3. Txny.lookupAbbr()
4.4. Txny.lookupCollision()
4.5. Txny.lookupSci()
4.6. Txny.lookupTxKey()
4.7. Txny.abbrToEng()
4.8. Txny.abbrToTex()
4.9. Txny.__init__()
4.10. Txny.__readTaxonomy()
4.11. txny.__buildMaps(): Index by key and scientific name
4.12. Txny.__addTaxonMaps(): Add a taxon to the internal dictionaries
4.13. Txny.__readAbbrs()
4.14. Txny.__readCollisions()
4.15. Txny.__addCollision(): Add one collision
5. class Hier
5.1. Hier.__init__()
5.2. Hier.canParentHaveChild()
5.3. Hier.formRank(), Hier.genusRank(), Hier.speciesRank(), and Hier.subgenusRank()
5.4. Hier.lookupRankCode()
5.5. Hier.__getItem__()
5.6. Hier.__iter__()
5.7. Hier.__len__()
6. class Rank: One taxonomic rank
6.1. Rank.__init__()
6.2. Rank.__str__()
7. class Taxon
7.1. Taxon.contains()
7.2. Taxon.nearestAncestor()
7.3. Taxon.childContaining(): Find child containing a descendant
7.4. Taxon.__cmp__(): Compare taxa in phylogenetic order
7.5. Taxon.__getitem__()
7.6. Taxon.__iter__()
7.7. Taxon.__len__()
7.8. Taxon.__str__()
7.9. Taxon.__init__(): The constructor
8. The abbr.py module
8.1. Prologue
8.2. abbreviate()
8.3. class BirdId
8.4. BirdId.__init__()
8.5. BirdId.normalize()
8.6. birdId.engComma(): Inverted English name
8.7. BirdId.__str__()
8.8. BirdId.scan()
8.9. BirdId.scanFlat()
8.10. BirdId.scanAbbr()
8.11. BirdId.scanAbbrFlat()
8.12. BirdId.parse(): Parse a code from a string

1. Introduction

This document describes the internals of the programs associated with A system for representing bird taxonomy.

Here, in literate style, is the source code for the Python objects in the txny.py module.

In addition to its utility in bird records management, this module is also an example of several useful techniques:

1.1. How to get this publication

This publication is available in Web form and also as a PDF document.

Source files mentioned in this document:

  • txny_schema.py: Python constants relating to the schema.

  • txny.py: Python module to access taxonomy data in XML form.

  • abbr.py: Six-letter bird code system module.

  • dom_helpers.py: Helper functions for the DOM (XML Document Object Model).