Help Pages for hamletworks.org
HW Home | Symbols Used | Browsing HW | Searching HW | Enfolded Hamlet | DjVu Plug-in

Some Tips for Searching The Enfolded Hamlet

The following is meant to help you avoid experiencing frustration when searching the special Linked Enfolded Hamlet included as part of the hamletworks.org website. The main difference between this and the familiar Enfolded Hamlet website is that the through-line numbers are now linked to hamletworks.org commentary notes for those lines. The Enfolded Hamlet can now be used as a context-sensitive means of browsing the hamletworks.org commentaries. The Through Line Number (TLN) is to the left of the text and the act-scene-line number is to the right. Clicking on the TLN to the left will bring you to the notes. From there you can return to the full text(s) and other lines to reach other notes, or you can navigate forward and backward from wherever you are in the notes. Hamletworks contains sets of entries detailing the textual and critical history of every line of the play. These entries are divided into three distinct types: Commentary Notes (CN), Material Textual Notes (TNM), and Immaterial Textual Notes (TNI).

For a discussion of the Enfolded Hamlet text itself and the editorial issues involved in its creation, please read Bernice Kliman's Introduction to the Enfolded Hamlet or Jesús Tronch's Introduction to the Modern Enfolded Hamlet. This text will confine itself to technical issues of the Web interface and the search engine. Note: you can actually run the sample searches included here by clicking in the text-entry boxes to activate them and sending a carriage return.

What You Cannot Find Here

The Enfolded Hamlet contains the original spelling texts of the Second Quarto and First Folio. There is no cast list. There are no modern act and scene divisions. Searches for these elements are bound to come up empty. Speakers' names have the abbreviations, often variable, found in the original texts. Thus searches for characters' names will ``hit'' only occurrences within speeches or stage directions. We now have modern act/scene/line numbers, as well as a modern spelling version of The Enfolded Hamlet created by Jesús Tronch that includes regularized, expanded character names. The Modern Enfolded is a selectable option.

The Search Engine

The Enfolded Hamlet makes use of a special search engine written in Perl. It searches for exact strings by default. Because of the original spellings, you may not find something you know is there using a default search. For instance, the string ``heaven'' does not occur in either of these texts, though there are dozens of examples spelled with the old u/v substitution, ``heauen''. You can find things like this in a number of ways. One is to use the ``Variant Spellings'' option for single words. This option preprocesses a modern spelling into a number of likely early modern English variations and then searches for any of these. For instance, a variant spellings search for

will turn up a hit for ``And {with} <why> such dayly {cost} <Cast> of brazon Cannon''. A variant spellings search for
finds the rather obscure ``But you must knowe your father lost a father, That father lost, lost his, and the suruiuer bound In filliall obligation for some tearme To doe obsequious sorrowe''. The difference is often dramatic. An exact spellings search for
turns up only two examples, while a variant spellings search for the same string
finds eighteen examples. Note: Variant Spellings searches are computationally expensive, so will often take longer than regular searches.

Another possibility is to use the many ``regular expressions'' available in Perl to make the search more flexible. A search for

or
will find examples of either ``heaven'' or ``heauen''. Regular expressions also allow you to get around vaguenesses of spelling and pronunciation. Thus a search for
will turn up ``Neither a borrower nor a lender {boy,} <be;>''.

Actually, multi-word search strings are silently optimized using regular expression expansions, so that an intuitive string like

is searched as
yielding ``Ham. To be, or not to be, that is the question'', and
is searched as
yielding ``Quee. The Lady {doth protest} <protests> too much mee thinks.''

Regular expressions can also be used to limit a search that is too broad. To limit a search to word boundaries, for instance, use the Perl ``\b'' word-boundary expression. Thus while the simple

will find not only ``day'' but ``dayly'' and ``Sunday'',
will find ``day'' and ``dayly'', and
will find only ``day'' itself.

Through-line Number Lookup

Searches for particular through-line numbers are handled specially. Any simple number typed as a search string is treated as a through-line number request, and the numbered string searched with word boundaries on either side. As the through-line numbers are always displayed with each line, the number for any passage is easily obtained and this can be an efficient method of narrowing a set of search results to a particular hit.

Display Contexts

The search engine by default displays three lines of context on either side of a ``hit''. The context size may be expanded by the user up to a maximum of 100 on either side for regular search strings. There is no context limit for through-number searches. The context for a particular search may be adjusted at any time using the special redisplay form underneath the title page.

Display Options

Each search with whatever context or the full text itself can be viewed with the following display options:

  1. Enfolded - the enfolded version with passages peculiar to the Quarto set off in curly braces {} and those peculiar to the Folio set off in angle brackets <>. Line breaks occurring only in the Folio appear as pipes | in the text.
  2. Modern Enfolded - the enfolded modern spelling version by Jesús Tronch with regularized, expanded character names. As in the orginal Enfolded, passages peculiar to the Quarto set off in curly braces {} and those peculiar to the Folio set off in angle brackets <>. Line breaks occurring only in the Folio appear as pipes | in the text.
  3. F1 - the First Folio version of the passages fully interpreted and without Second Quarto passages.
  4. F1 Only - those lines or parts of lines that occur only in the First Folio.
  5. Q2 - the Second Quarto version of the passages fully interpreted and without First Folio passages or line breaks.
  6. Q2 Only - those lines or parts of lines that occur only in the Second Quarto.
Any of these display options may be selected with the initial form or with the special redisplay form, allowing the user to view, save, or print any set of results quickly in different formats.

Color Coding

Browsers that support font colors will display the different texts with color coding. The Enfolded text appears as dark blue with passages peculiar to the Quarto in green and passages peculiar to the Folio in purple. When the Quarto text by itself is selected, the entire text appears as green. When the Folio text by itself is selected, the entire text appears as purple. Any search terms that have been found appear as a lighter blue.