# Document classification

Document classification assigns documents to predefined categories, combining library science traditions with algorithmic methods from computer science. It covers manual, automated, and hybrid approaches for texts, images, and other media.

Document classification, also called document categorization, is a task in library science, information science, and computer science that involves assigning a document to one or more classes or categories. The assignment can be performed manually, often by librarians or subject experts, or algorithmically using computational techniques. Intellectual classification has historically been central to library science, while algorithmic classification is a core topic in information science and computer science, though the two fields overlap substantially and foster interdisciplinary research.

The documents to be classified can include texts, images, music, and other media, each presenting distinct classification challenges. Unless specified otherwise, the term typically implies text classification. Documents may be categorized by subject matter or by other attributes such as document type, author, or publication year, but subject classification is the most common focus. Two broad philosophies guide subject classification: content-based and request-based approaches.

## Content-Based vs. Request-Based Classification

Content-based classification assigns a document to a class based on the weight or proportion of content devoted to particular subjects. For example, libraries often apply a rule that at least 20% of a book's content must relate to the assigned class. In automatic systems, this weight might correspond to the frequency of certain words or terms within the document.

Request-based classification, also known as request-oriented classification or indexing, prioritizes the anticipated needs of users. A classifier asks which descriptors would help a user find the document, considering all possible queries and determining for which ones the document is relevant. This approach often reflects a specific audience or institutional policy; for instance, a feminist studies database might index documents differently than a general historical library. Request-based classification is better understood as policy-driven rather than purely user-driven, unless it incorporates empirical data about actual user behavior.

## Classification vs. Indexing

The distinction between assigning documents to classes (classification) and assigning subjects to documents (subject indexing) is often considered superficial. Information scientist Frederick Wilfrid Lancaster argued that such terminological distinctions are meaningless and cause confusion. This view is supported by the interchangeability of classification systems and thesauri: a classification scheme can be transformed into a thesaurus and vice versa. Assigning a subject term to a document is equivalent to assigning it to the class of documents indexed by that term, since all documents sharing the same term belong to the same class.

## Automatic Document Classification

Automatic document classification (ADC) uses computational methods and [machine-learning](https://www.wikiprompt.org/wiki/machine-learning) to categorize documents. ADC tasks fall into three categories: supervised classification, where external feedback (such as human labels) provides correct classifications; unsupervised classification, also called document clustering, which operates without external reference; and semi-supervised classification, which combines labeled and unlabeled data. Numerous software products exist under various license models.

Common techniques include artificial [neural-network](https://www.wikiprompt.org/wiki/neural-network) approaches, decision trees (e.g., ID3 or C4.5), expectation maximization, latent semantic indexing, naive Bayes classifiers, support vector machines (SVM), k-nearest neighbor algorithms, and term frequency-inverse document frequency (tf-idf). Advances in [deep-learning](https://www.wikiprompt.org/wiki/deep-learning) and [transformer](https://www.wikiprompt.org/wiki/transformer) architectures have enabled more sophisticated models, such as [large-language-model](https://www.wikiprompt.org/wiki/large-language-model)-based classifiers that capture semantic context beyond simple word counts.

## Applications

The practical applications of document classification are diverse. In spam filtering, algorithms distinguish unwanted email from legitimate messages. Email routing uses classification to direct messages to appropriate recipients based on topic. Language identification automatically detects a document's language, while genre classification determines its literary or rhetorical type. Readability assessment evaluates text complexity for different age groups or reading levels, often supporting text simplification systems. Sentiment analysis identifies the attitude or emotional tone expressed in a document. In public health surveillance, classification of social media posts helps monitor disease outbreaks. Article triage, particularly in biology, selects relevant papers for manual curation in databases.

## Challenges and Trends

A key challenge in automatic classification is handling the diversity of document types and the ambiguity of natural language. Early systems relied on handcrafted features, but modern methods leverage [deep-learning](https://www.wikiprompt.org/wiki/deep-learning) to learn representations automatically. The rise of [generative-ai](https://www.wikiprompt.org/wiki/generative-ai) and pre-trained [transformer](https://www.wikiprompt.org/wiki/transformer) models has shifted the field toward fine-tuning and few-shot learning, reducing the need for vast labeled datasets. However, issues like bias, interpretability, and computational cost remain active research areas. Interdisciplinary collaboration between library science, information science, and computer science continues to refine both manual and algorithmic classification, ensuring that systems remain adaptable to evolving user needs and document formats.

## External links

- [Wikipedia: Document classification](https://en.wikipedia.org/wiki/Document_classification)

---
Source: https://www.wikiprompt.org/wiki/document-classification
License: CC BY-SA 4.0 (https://creativecommons.org/licenses/by-sa/4.0/)
Last updated: 2026-09-14T06:26:35.054446+00:00
