Fig. 1 shows an overview of the automatic document naming system. A scanned document is first separated into text, figures, and tables. Then, optical character recognition (OCR) is performed on the text, and the title of the document is identified using the OCR results that include text coordinate information and text size. To assign an appropriate file name, natural language processing is then performed on the text recognition results. By using natural language processing, words that appear to be important are identified. Using the identified title and keywords, the document's category is determined, along with a document name. The categories of documents and document naming rules can be freely specified by the user.