SWAN uses find and egrep to supply definitions for all resources in the subweb, and to select fragment definitions and hyperlinks, together with their line numbers, from all HTML documents in the subweb. Definitions and hyperlinks are selected by the occurrence of an anchor or image tag. SWAN uses sed to transform the output of the preceding phase. Isolate definitions and hyperlinks, splitting lines when necessary. Lines retain their form.
Lines retain their form.
SWAN uses sort to make each definition and all hyperlinks to it consecutive lines. Definitions, if present, appear before hyperlinks. The output of this phase is called the inventory of the subweb. SWAN uses awk to report statistics and inconsistencies, and to create the cross references. Actually, SWAN is pretty tolerant, since it ignores most HTML code anyway.