1. A method comprising: obtaining a set of title components for a document; wherein each title component in the set of title components is a text string; classifying each title component of the set of title components into at least one title component class of a plurality of title component classes; selecting a title template from among a plurality of available title templates; wherein the selected title template has one or more title component slots; wherein each title component slot of the one or more title component slots corresponds to one title component class of the plurality of title component classes; generating a candidate title for the document including completing each title component slot of the selected title template with a title component selected from the title component class corresponding to that title component slot; wherein the generated candidate title is a text string having, as sub-text strings, the title components selected to complete the selected title template; selecting the candidate title as a title for the document; wherein the method is performed by one or more computing devices.
1. A method comprising: obtaining a set of title components for a document; wherein each title component in the set of title components is a text string; classifying each title component of the set of title components into at least one title component class of a plurality of title component classes; selecting a title template from among a plurality of available title templates; wherein the selected title template has one or more title component slots; wherein each title component slot of the one or more title component slots corresponds to one title component class of the plurality of title component classes; generating a candidate title for the document including completing each title component slot of the selected title template with a title component selected from the title component class corresponding to that title component slot; wherein the generated candidate title is a text string having, as sub-text strings, the title components selected to complete the selected title template; selecting the candidate title as a title for the document; wherein the method is performed by one or more computing devices. 6. The method of claim 1 , further comprising generating the candidate title for the document including completing each title component slot of the selected title template with a title component selected from the title component class corresponding to that title component slot based on at least one of: a query submitted from a client or one or more presentation constraints associated with the client.