6. A system comprising: a client machine configured to: display a document that includes a script and a program, the program being executable to initiate an analysis that identifies a word in the document as a contextual keyword of the document, the script being executable to highlight any contextual keywords identified in the document; by executing the program included within the document, initiate the analysis in response to the program sending a request to a server machine; by executing the program included within the document, perform the analysis by: determining an occurrence frequency of the word in the document; determining that the word is among a group of most frequently occurring words in the document, the group having a predefined size; identifying an ad category with a highest probability of containing the word based on the word being among the group of most frequently occurring words in the document; comparing the word in the document with words contained in the ad category; and identifying the word in the document as the contextual keyword of the document that is being displayed; and the server machine comprising a processor and configured to: select an ad from a publication system and from a further ad category that includes the highest number of ads related to the contextual keyword of the document that is being displayed; the client machine including: an event detector configured to detect a mouseover event over the word that is highlighted in the document that is being displayed a user interface configured to display the ad within a tooltip window over the document in response to the mouseover event over the word highlighted in the document that is being displayed.
8. The system of claim 6 , wherein the client machine is configured to perform at least one of: by executing the program included within the document, detect a language of the document, or by executing the program included within the document, remove one or more words from the document.