1. A method implemented in a computer system having a processor and a memory for identifying whether an outgoing communication contains confidential information, the method comprising: generating, by the computer system, indexes by, providing documents that contain confidential information; for each word in the provided documents, determining an importance value for the word, and when the importance of the word exceeds a first threshold, designating the word as a keyword; generating a keyword index that maps each keyword to the provided documents that contain the keyword; generating a sentence hash table that maps hash codes of sentences to the provided documents that contain the sentences; and determining, by the computer system, whether an outgoing communication contains confidential information by, receiving an outgoing communication after the keyword index and sentence hash table have been generated; identifying keywords of the outgoing communication, wherein the outgoing communication includes keywords and non-keywords; using the generated keyword index to locate candidate documents based on similarity of keywords of the documents to identified keywords of the outgoing communication wherein the candidate documents are a proper subset of the target documents; generating hash codes of sentences of the outgoing communication; using the generated sentence hash table to identify candidate documents that contain sentences that match sentences of the outgoing communication; comparing the sentences of the identified candidate documents to sentences of the outgoing communication; and when the comparison indicates a second threshold number of sentences match, flagging the outgoing communication as containing confidential information.
1. A method implemented in a computer system having a processor and a memory for identifying whether an outgoing communication contains confidential information, the method comprising: generating, by the computer system, indexes by, providing documents that contain confidential information; for each word in the provided documents, determining an importance value for the word, and when the importance of the word exceeds a first threshold, designating the word as a keyword; generating a keyword index that maps each keyword to the provided documents that contain the keyword; generating a sentence hash table that maps hash codes of sentences to the provided documents that contain the sentences; and determining, by the computer system, whether an outgoing communication contains confidential information by, receiving an outgoing communication after the keyword index and sentence hash table have been generated; identifying keywords of the outgoing communication, wherein the outgoing communication includes keywords and non-keywords; using the generated keyword index to locate candidate documents based on similarity of keywords of the documents to identified keywords of the outgoing communication wherein the candidate documents are a proper subset of the target documents; generating hash codes of sentences of the outgoing communication; using the generated sentence hash table to identify candidate documents that contain sentences that match sentences of the outgoing communication; comparing the sentences of the identified candidate documents to sentences of the outgoing communication; and when the comparison indicates a second threshold number of sentences match, flagging the outgoing communication as containing confidential information. 10. The method of claim 1 wherein the outgoing communication is an attachment to an electronic mail message.