Information has traditionally been manually classified to aid potential readers in locating works of interest. For example, books are typically associated with categorization information (e.g., one or more Library of Congress classifications) and academic articles sometimes bear a list of keywords selected by their authors or editors. Unfortunately, while manual classification may be routinely performed for certain types of information such as books and academic papers, it is not performed (and may not be feasibly performed) for other types of information, such as the predominantly unstructured data found on the World Wide Web.
Attempts to automatically classify documents can also be problematic. For example, one technique for document classification is to designate as the topic of a given document the term occurring most frequently in that document. A problem with this approach is that in some cases, the most frequently occurring term in a document is not a meaningful description of the document itself. Another problem with this approach is that terms can have ambiguous meanings. For example, documents about Panthera onca, the British luxury car manufacturer, and the operating system might all be automatically classified using the term “Jaguar.” Unfortunately, a reader interested in one meaning of the term may wind up having to sift through documents pertaining to all of the other meanings as well.
Various embodiments of the invention are disclosed in the following detailed description and the accompanying drawings.
The invention can be implemented in numerous ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer readable storage medium; and/or a processor, such as a processor configured to execute instructions stored on and/or provided by a memory coupled to the processor. In this specification, these implementations, or any other form that the invention may take, may be referred to as techniques. In general, the order of the steps of disclosed processes may be altered within the scope of the invention. Unless stated otherwise, a component such as a processor or a memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform the task at a given time or a specific component that is manufactured to perform the task. As used herein, the term ‘processor’ refers to one or more devices, circuits, and/or processing cores configured to process data, such as computer program instructions.
A detailed description of one or more embodiments of the invention is provided below along with accompanying figures that illustrate the principles of the invention. The invention is described in connection with such embodiments, but the invention is not limited to any embodiment. The scope of the invention is limited only by the claims and the invention encompasses numerous alternatives, modifications and equivalents. Numerous specific details are set forth in the following description in order to provide a thorough understanding of the invention. These details are provided for the purpose of example and the invention may be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical material that is known in the technical fields related to the invention has not been described in detail so that the invention is not unnecessarily obscured.
In various embodiments, corpus processor 106 collects documents on demand. For example, a user of platform 116 (hereinafter “Benjamin Snyder,” an architect living in California) may initiate a request (via interface 118) for documents that pertain to him. In response to the request, corpus processor 106 obtains documents from one or more of the data sources. Corpus processor 106 can also be configured to store and periodically refresh the documents it collects regarding Benjamin Snyder, such as upon the request of Benjamin Snyder, or programmatically (e.g., once a month).
Corpus processor 106 is configured to process the collected documents and make them available to clustering system 102 as an input data set (104). As one example, in some embodiments corpus processor 106 is configured to convert the documents it receives into plaintext, or otherwise extract text from those documents, as applicable. As will be described in more detail below, clustering system 102 is configured to discover clusters in the input data set and define the theme of each cluster.
Whenever clustering system 102 is described as performing a task, either a single component or a subset of components or all components of system 102 may cooperate to perform the task. Similarly, whenever a component of system 102 is described as performing a task, a subcomponent may perform the task and/or the component may perform the task in conjunction with other components. In various embodiments, portions of system 102 are provided by one or more separate devices. As one example, the functionality of preprocessing engine 210 and clustering engine 212 may be provided by two different devices, rather than the functionality being provided by a single device. Also, in various embodiments, system 102 provides the functionality of corpus processor 106 and a separate corpus processor is omitted, as applicable.
Clustering system 102 is configured to perform a variety of tasks, including preprocessing (via preprocessing engine 210) and document clustering (via clustering engine 212).
Preprocessing
Clustering system 102 receives as input a set of documents 104 (e.g., from corpus processor 106). Preprocessing engine 210 uses the data set to create a term-by-document matrix M and a keyword list (ordered by column number of M).
A text object (i.e., a document or set of documents) is represented in Latent Semantic Indexing (“LSI”) by its term frequency (“TF”). The term frequency representations of two example documents d1 and d2, and of a collection C1 comprising those two documents, are as follows:
d1=[2,0,3,0,0,5,0,1,4]
d2=[1,3,0,2,0,3,0,0,3]
C1=d1+d2=[3,3,3,2,0,8,0,1,7]
A concept representation of a text object can also be created, which shows whether the object contains the given term, but does not indicate the number of times the term appears in the document. Using the term frequencies for d1, d2, and C1 above, the concept representations are as follows:
Term Frequency Rep.→Concept Rep.
d1=[2,0,3,0,0,5,0,1,4]→b1=[1,0,1,0,0,1,0,1,1]
d2=[1,3,0,2,0,3,0,0,3]→b2=[1,1,0,1,0,1,0,0,1]
C1=[3,3,3,2,0,8,0,1,7]→B1=[1,1,1,1,0,1,0,1,1]
Suppose the total data set (e.g., received by clustering system 102 as input 104) has n=Nd documents and a vocabulary of m=Nt keywords. Matrix M can be constructed as:
The keyword list has Nt elements and the order of the keywords in the list matches the order of columns of the TF representation of the documents.
In some embodiments, Matrix M and the keyword list are created as follows: Suppose a total of 50 documents are received as a set 104 by clustering system 102. The documents are stored in a directory of storage 208 as individual files. Preprocessing engine 210 uses a Java program to construct a single file (“doc-file”) from the documents in the directory, with each line of the doc-file representing the content of one of the 50 documents. Various rules can be employed to construct the single doc-file, such as by removing email addresses in documents having more than 5,000 characters; truncating documents that are longer than 50,000 characters; and removing any HTML tags or other strings that may erroneously remain after the processing performed by corpus processor 106. Next, the doc-file is used to generate a “mat-file” and a “mat-file.clabel” file by using the doc2mat Perl program. The mat-file includes information about Matrix M and the mat-file.clabel file lists the keywords (e.g., after a tokenization using stemming and ignoring numerical terms is performed). Finally, the mat-file and mat-file.clabel files are read to create the Matrix M and the keyword list using an appropriate Java program. In various embodiments, additional processing is performed when constructing the matrix and keyword list from the mat-file and mat-file.clabel. For example, terms that appear in only a single one of the 50 documents can be omitted.
Clustering
Initial Clustering
The process begins at 302 when a data set is clustered into one or more initial clusters using a first term set. A variety of clustering techniques can be used and the process described herein adapted as applicable. In some embodiments the clustering is performed using LSI-SVD, as follows. A Matrix Qa is derived from Matrix M based on the following equation:
Qa=√{square root over (c)}Dn−1M, where constant c and matrix Dn are defined as follows:
Next, singular value decomposition ([U,S,V]=svd(Qa,0)) is used to obtain and plot the coordinates of terms in a reduced two-dimensional space. Specifically, the coordinates can be derived from the m×m Matrix U:
{right arrow over (t)}i=(xi,yi),xi=U(xi,yi),yi=U(i,2),iε{1, 2, . . . , m=Nt}.
The angles between terms (term-term angles) are calculated on a unit sphere:
For each term ti, a group of closely related terms is built, where an assumption is made that term ti and tj are closely related if θ is smaller than a threshold value, for example:
Each group is an m-dimensional concept representation.
Next, LSI-SVD is used to calculate a document-document distance matrix and plot it on a two-dimensional graph. Specifically, a weight Matrix W is built from Matrix M as follows:
Singular value decomposition ([U,S,V]=svd(WT,0)) is used to obtain and plot the coordinates of documents in a reduced two-dimensional space. Specifically, the coordinates can be derived from the n×n Matrix V:
{right arrow over (d)}μ=(xμ,yμ),xμ=V(μ,1),yμ=V(μ,2)με{1, 2, . . . , n}.
The distances between documents (“ddDist”) are calculated as follows:
dist(dμ,dv)=|{right arrow over (d)}μ−{right arrow over (d)}v|.
Finally, cluster membership is determined, using the assumption that a document belongs to a cluster (referred to as an “initial cluster” at this stage of processing) if its distance from at least one document in the cluster is less than a threshold value. In some embodiments the threshold value is an optimized radius. For example, it may be estimated as: ρ=κ×σ(min DistMin, max DistMin), where κ is a parameter based on the size of the dataset (for example, κ=3.5 for entity datasets), and σ(min DistMin, max DistMin) is an empirical function derived from the best fitting for several small datasets using the minimum and maximum of the minimum distances between documents. Documents that do not belong to any clusters are left as singletons.
At 304, a theme of each initial cluster is determined by a set of keywords. One way of determining themes is as follows. First, a set of core terms is calculated for each of the initial clusters, using the following three cases:
Case 1: Use the original terms shared by all documents in the cluster. (This case will likely apply to sets with hundreds of terms per document, or more.)
Case 2: If no terms are found in Case 1, add connected terms which are closely related to the terms in the documents, e.g., in accordance with the definition of “closely related” above. (This may be required for some small data sets.)
Case 3: If no terms are found in Case 2, use the union of the terms of all documents in the cluster. (This may be required for some very small data sets.)
Next, the concept of the cluster is calculated as the union of the core terms of the cluster and any terms closely related to those terms.
Finally, a theme representation of the entire data set is determined as follows. A term frequency representation (“clusterTF”) is constructed for each cluster in accordance with rules, such as the following: (1) the term is not shared by all cluster concepts; (2) the term is contained by at least one document in the clusters; and (3) the total term frequency of the term is not less than a threshold value “tfMin.” The concept shared by all clusters (i.e., the “theme” of the dataset) and the “theme” of each cluster, defined by the top “tfMax” (a threshold value, set to 12 by default) frequent terms based on the cluster term frequency representation are displayed.
For very small data sets, the processing performed at 302-304 of process 300 may be sufficient to achieve satisfactory clusters and theme representations. However, for more typical data sets, the existence of noise terms obscures clusters. As will now be described, renovated clusters, using a reduced term space in which noise terms are excluded, can be used to improve clustering results.
Reduced Term Space
At 306, the term space is reduced. One approach for reducing the term space is as follows. Suppose a term frequency representation for each cluster (“clusterTF”) has already been created, as described above. A reduced term space can be constructed by keeping in the term space only those terms in the clusterTFs.
Renovated Clustering
At 308, the data set is reclustered into one or more baby clusters using the reduced term space. In some embodiments, the same clustering techniques employed at 302 are used again at 308. In other embodiments, an alternate clustering technique is used. One example of such an alternate technique will now be described.
First, a new document term frequency Matrix M2 and keyword list with a reduced term space of dimension m′<m are built. Instead of using singular value decomposition, for the second round of clustering a vector space model (VSM) is used to define relations of documents. The coordinates of documents are found this time using a weight Matrix W built from Matrix M2 as follows:
A variety of different weight formulae can be used—the preceding is provided merely as an example. Next, a document-document relevance coefficient (“ddRC”) is calculated based on the calculated weights, together with a minimum and maximum:
A document is assumed to belong to a cluster if its relevance coefficient (“RC”) with one of the documents in the cluster is greater than the value of “rcMin.” In some embodiments, rcMin is 0.45. Using such a value for rcMin will typically result in small clusters (also referred to herein as “baby clusters”) and several singletons (illustrated in
Reassigning Singletons
At 310, an attempt is made to reassign singletons to the baby clusters. One approach to performing this assignment is as follows: A singleton will be assigned to a given cluster if (1) the RC with that cluster is greater than its RC with any other cluster; and (2) the RC is greater than a minimum threshold value “rcS.” In some embodiments, rcS=0.05 by default.
The RC between a document dμ and a cluster cα is calculated as:
The reassignment of singletons is conceptually illustrated in
As illustrated in
At 312, renovated themes are determined for the renovated clusters. In various embodiments, the processing performed at 312 is the same as the processing preformed at 304.
Output
Finally, at 314 the renovated themes, renovated clusters (including any reassigned singletons), and/or any remaining singletons are provided as output 214, as applicable. The output of process 300 can be used in a variety of contexts, examples of which are described below.
System 102 can be used to help the Benjamin Snyder mentioned in conjunction with
As another example, a celebrity that may be commonly mentioned in news articles can use system 102 to receive news alerts about one aspect of the celebrity's life (e.g., film-making or parenting) and selectively ignore information about other aspects (e.g., a failed musical career). In this scenario, the input set could be generated as a result of a search for the celebrity on site 114, with the results being automatically clustered into the various themes.
As yet another example, a user of platform 116 can perform a search for documents residing on data source 110 pertaining to “jaguars,” and receive back results clustered based on the various disambiguations of the term.
In various embodiments, output 214 is provided to other processes, in addition to or instead of being displayed to a human user. For example, in the case of the celebrity described above, sentiment analysis can be performed by another component of platform 116 to assign scores to the distinct aspects of the celebrity's life (as determined from the clusters). In such a scenario, the celebrity might learn that articles mentioning the celebrity's film-making attempts are 70% positive, while articles mentioning the musical career are 25% positive.
Initial Clustering
Using singular value decomposition for term-term interaction and LSI-SVD for document-document interaction, with κ=4.5, the initial clusters (and no singletons) depicted in
Reducing Term Space and Re-Clustering
Using the clustering term frequency representations obtained in initial clustering, a new matrix and keyword list using the reduced term space is generated. At this point, the dimension of the keyword list is now 93. Reclustering is performed using VSM with an rcMin=0.45 and, as illustrated in
Reassigning Singletons
Finally, singletons are reassigned by calculating its RC with each cluster (as in VSM) and keeping the document as a singleton if the max RC<rcS. (Shown in
Although the foregoing embodiments have been described in some detail for purposes of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways of implementing the invention. The disclosed embodiments are illustrative and not restrictive.
This application is a continuation of co-pending U.S. patent application Ser. No. 13/335,665, entitled THEMATIC CLUSTERING filed Dec. 22, 2011 which is incorporated herein by reference for all purposes.
Number | Name | Date | Kind |
---|---|---|---|
6374251 | Fayyad et al. | Apr 2002 | B1 |
6611825 | Billheimer et al. | Aug 2003 | B1 |
6701305 | Holt et al. | Mar 2004 | B1 |
20020026456 | Bradford | Feb 2002 | A1 |
20040024598 | Srivastava et al. | Feb 2004 | A1 |
20040064438 | Kostoff | Apr 2004 | A1 |
20040205457 | Bent et al. | Oct 2004 | A1 |
20040220944 | Behrens et al. | Nov 2004 | A1 |
20040230577 | Kawatani | Nov 2004 | A1 |
20050165736 | Oosta | Jul 2005 | A1 |
20060218140 | Whitney et al. | Sep 2006 | A1 |
20060242190 | Wnek | Oct 2006 | A1 |
20070118518 | Wu et al. | May 2007 | A1 |
20070156665 | Wnek | Jul 2007 | A1 |
20070271287 | Acharya et al. | Nov 2007 | A1 |
20070271292 | Acharya et al. | Nov 2007 | A1 |
20080168019 | Dakka et al. | Jul 2008 | A1 |
20080294686 | Long et al. | Nov 2008 | A1 |
20090210406 | Freire et al. | Aug 2009 | A1 |
20100114561 | Yasin | May 2010 | A1 |
20100174670 | Malik et al. | Jul 2010 | A1 |
20100268526 | Bradford | Oct 2010 | A1 |
20110022597 | Gallivan et al. | Jan 2011 | A1 |
20110087668 | Thomas et al. | Apr 2011 | A1 |
20120209847 | Rangan | Aug 2012 | A1 |
Entry |
---|
Xiaoyan et al.; “Simultaneous Clustering and Noise Detection for Theme-based Sumarization”; http://aclweb.org/anthology/I/I11/I11-1055.pdf; Oct. 28, 2011. |
Farahat et al.; “Enhancing Document Clustering Using Hybrid Models for Semantic Similarity”; http://web.eecs.utk.edu/events/tmw10/slides/Farahat.pdf; 2010. |
Number | Date | Country | |
---|---|---|---|
Parent | 13335665 | Dec 2011 | US |
Child | 13474566 | US |