Graph-based Word Clustering using a Web Search Engine

Yutaka Matsuo, Takeshi Sakaki, Koki Uchiyama, Mitsuru IshizukaEMNLP 2006

Abstract

Word clustering is essential for automatic thesaurus construction, text classification, and word sense disambiguation. This paper proposes an unsupervised algorithm for word clustering based on a word similarity measure derived from web hit counts. By querying pairs of words to a search engine, a co-occurrence matrix is produced and converted into a word co-occurrence graph. We apply Newman clustering—a community detection algorithm—to identify word clusters efficiently. Evaluations on datasets from a web directory and WordNet demonstrate that our approach significantly outperforms traditional methods.

Introduction

Traditional natural language processing (NLP) relies on large, static corpora to determine word relationships. However, these corpora often suffer from the sparse data problem, particularly for rare terms, brand names, or emerging technical vocabulary. To address this, we treat the entire web as a dynamic corpus. While the web is vast and up-to-date, it is also noisy. The challenge lies in accurately measuring the association between words using only search engine hit counts and then grouping those words into meaningful clusters without manual intervention.

Methodology

The proposed algorithm follows a four-step pipeline to transform raw web counts into distinct word groups:

  1. Obtaining Web Counts: For a set of $n$ words, we perform $nC_2$ queries to a search engine to determine how often pairs of words appear together on the same page.
  2. Calculating Similarity: We utilize the chi-square ($\chi^2$) measure instead of Pointwise Mutual Information (PMI). While PMI is common, it is often unstable with the extreme frequency ranges found on the web. The $\chi^2$ measure treats the co-occurrence matrix as a contingency table, providing a more robust metric against the broad range of web counts.
  3. Graph Construction: A graph is created where each word is a node. An edge is established between two words if their $\chi^2$ similarity exceeds a threshold determined by the desired network density.
  4. Newman Clustering: To identify clusters, we apply Newman clustering. Unlike traditional hierarchical clustering, this algorithm focuses on edge betweenness—identifying and removing edges that act as bridges between dense communities to reveal the underlying clusters.
Newman clustering identifies edges with high betweenness to reveal community structures.

Evaluation and Results

We evaluated our approach on two Japanese-language datasets: DMOZ-J (90 words from 9 web directory categories) and WordNet (9 groups of 10 words sharing common hypernyms).

Similarity Accuracy

In the DMOZ-J dataset, the chi-square measure achieved a mean precision of 0.537, significantly outperforming PMI (0.415) and the Jaccard coefficient (0.402). This confirms that $\chi^2$ is better suited for the high-variance data returned by search engines.

Clustering Performance

The combination of Chi-square and Newman clustering yielded an F-measure of 0.480, nearly triple the performance of standard Average-link hierarchical clustering (0.164). Qualitatively, the algorithm successfully separated distinct concepts, such as "printer-related" terms from "TV-related" terms, even when search results were noisy.

Comparison of clustering results using PMI (left) and Chi-square (right) similarity measures.

Discussion and Conclusion

By viewing word clustering as a community detection problem, we can leverage the global structure of the word graph rather than just local distances. This method is particularly potent for "new words" or brand names (e.g., InterLaser or Aquos) that may not appear in formal dictionaries but have clear associations on the web.

Future work will focus on improving query efficiency to mitigate the $O(n^2)$ bottleneck and addressing polysemy, where words with multiple meanings can act as bridges that accidentally merge unrelated clusters. Additionally, using proximity operators (e.g., "NEAR") instead of page-level co-occurrence could further refine the accuracy of the similarity measures.

Summary updated

BibTeX
@inproceedings{matsuo2006graph,
  author = {Yutaka Matsuo and Takeshi Sakaki and Koki Uchiyama and Mitsuru Ishizuka},
  title = {{Graph-based Word Clustering using a Web Search Engine}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2006},
  url = {https://openreview.net/forum?id=ryNAmGzu-B},
}
Figure