1. A computer-implemented method comprising: receiving a document that contains a set of terms that correspond to entities; based at least in part on the set of terms, automatically identifying one or more entities whose identities the document contains; and for each particular entity of the one or more entities, performing steps comprising: based at least in part on a set of entity-to-type mappings, automatically determining one or more types of the particular entity; based at least in part on the one or more types of the particular entity, generating, for the document, metadata that indicates the one or more types of the particular entity; and storing the metadata on a volatile or non-volatile computer-readable storage medium; based at least in part on the metadata, generating script which, when executed by an application, causes the application to present, to a user, one or more items that are based on the one or more types of an entity of the one or more entities; wherein generating the script further comprises: determining one or more modules that are mapped to the one or more types of said entity of the one or more entities; and generating the script based on functionality that is specified by the one or more modules; wherein the one or more modules are contained in a set of modules that includes at least a first module and a second module; wherein the one or more types are contained in a set of types that includes at least a first type and a second type; wherein multiple types in the set of types are mapped to the first module; wherein multiple types in the set of types are mapped to the second module; wherein the first type, but not the second type, is mapped to the first module; wherein the second type, but not the first type, is mapped to the second module; wherein the one or more types include at least one of the first type and the second type; wherein the steps are performed by one or more computing devices.