  This work describes a classification of the $N$-soliton solutions of the
Kadomtsev-Petviashvili II equation in terms of chord diagrams of N chords
joining pairs of 2N points. The different classes of N-solitons are enumerated
by the distribution of crossings of the chords. The generating function of the
chord diagrams is expressed as a continued fraction, special cases of which are
moment generating functions for certain kinds of $q$-orthogonal polynomials.
