what we use as our agglomeration criterion. This is the contiguity-constrained complete link hierarchical clustering method. Apart from heuristic reasons for favoring it, it has some further properties that will now be discussed briefly.

The sequence-related adjacency requirement must take into consideration whether an agglomerative clustering method would give rise to an inversion, i.e., a later agglomeration in the sequence of agglomerations would have an associated criterion value that is less than the previous criterion value. It is not hard to appreciate that our desire to have gradations of distance represented by the dendrogram would be negated, and severely so, by such absence of the monotonicity of criterion value, which amounts to a contradiction in interpretation of the dendrogram.

It is shown in [17] that two algorithms are feasible. What is involved here is sketched out as follows.

Continuity-constrained single link hierarchical clustering is simultaneously hierarchical clustering on the spanning graph. This is easy to implement (inefficiently): just fix an infinite (or very large) distance between non-contiguous pairs and proceed to use single link hierarchical clustering [17].

The complete link method, with the constraint that at least one member of each of the two clusters to be agglomerated be contiguous, is guaranteed not to give rise to inversions. The O(n 2) time, O(n 2) space algorithm for the complete link method, based on the nearest neighbor chain (see [17]), is easily modified to include an additional testing of contiguity whenever a linkage in the nearest neighbor chain is created.

In this work we use the latter, in view of the well-balanced hierarchies typically produced, [16].

## 5 Casablanca Film Script Analysis 5.1 Data Used

Based on the unpublished 1940 screenplay by Murray Burnett and Joan Allison, [3], the Casablanca script by Julius J. Epstein, Philip G. Epstein and Howard Koch led to the film directed by Michael Curtiz, produced by Hal B.

Wallis and Jack L. Warner, and shot by Warner Bros. between May and August 1942. We used the script from The Internet Movie Script Database, IMSDb
(www.imsdb.com).

The Casablanca film script comprises 77 successive scenes. All told, there were 6710 words in these successive scenes.

The source text for the 77 scenes, including metadata, varied between just 5 words, and 1017 words (scene 22). Typical Zipf distributional behavior is seen in the marginals. All words were used, following the imposing of lower case throughout. This was subject only to words being longer than one character.

No stemming or other preprocessing was used. The top word frequencies were interesting: the, 965; rick, 689; you, 651; to, 574; and, 435; in, 332; of, 319; renault, 284; it, 271; ilsa, 256; laszlo, 255; he, 236; is, 232; at, 192; that, 171; for, 7