The aim of this contribution is to show one of the most important application of text mining. According to a wide part of the literature regarding the aforementioned field, great relevance is given to the classification task (Drucker et al., 1999, Nigam et al., 2000). The application contexts are several and multitask, from text filtering (Belkin & Croft, 1992) to word sense disambiguation (Gale et al., 1993) and author identification ( Elliot and Valenza, 1991), trough anti spam and recently also anti terrorism. As a consequence in the last decade the scientific community that is working on this task, has profuse a big effort in order to solve the different problems in the more efficient way. The pioneering studies on text categorization (TC, a.k.a. topic spotting) date back to 1961 (Maron) and are deeply rooted in the Information Retrieval context, so declaring the engineering origin of the field under discussion. Text categorization task can be briefly defined as the problem of assigning every single textual document into the relative class or category on the basis of the content and employing a classifier properly trained. In the following parts of this contribution we will formalize the classification problem detailing the main issues related.
In a formal way, text categorization is the task of assigning a Boolean value to:(dj, ci) ∈ D × Cwhere D is a domain of documents and C = [c1, ……, c|C|] is a set of predefined categories. A value of T assigned to (dj, ci) indicates a decision to file dj (also called positive example) under ci, and a value of F assigned to (dj, ci) indicates a decision not to file dj (also called negative example) under ci. In other words a function, able to approximate the relation between the set D of documents and the set C of categories, is needed by means of a classifier able to learn the main characteristic of each categories on the basis of the information contained in the documents.
We emphasize that the c categories are simply symbolic labels (authors’ name, spam or not spam, different topics) and often no further information is available.
Regarding the relation between documents and categories two different formulations should be mentioned (Sebastiani, 2003):
Given a document dj ∈ D, all the categories under which it could be filed, are checked, (document-pivoted categorization-DPC);
Given a category ci ∈ C, all the documents that could be filed under it, are checked (category-pivoted categorization-CPC).
Actually the above distinction is more practical than theoretical, in any case it can be useful whenever C and D are not fully available from the beginning.
Now we want to refer two main approaches employed in the construction of a text classifier.
The first one is the Knowledge Engineering, born in ’80, dealing with the manual construction of several decision rules, of type if (some characteristic) then (category i-th). As the reader can simply infer this approach was too expensive either from a human or a time point of view. In fact those rules needed, not only to be thought about by an human expert of the relative topic, but also to be updated every time some constitutive elements change.
The ideal field for TC was found in Machine learning community that introduced the idea of a supervised classifier able to learn the key elements of each category on the basis of some preclassified documents. We underline that according to this formulation, the wish is not simply constructing a classifier, but mainly creating a builder of classifier automatizing the whole process.