CROSS-REFERENCE TO RELATED APPLICATIONS

This application is based on and claims priority under 35 USC 119 from Japanese Patent Application No. 2018-100397 filed May 25, 2018.

BACKGROUND

(i) Technical Field

The present disclosure relates to an information processing apparatus and a non-transitory computer readable medium.

(ii) Related Art

Electronic document filing by which a paper document is scanned and stored as an electronic document file has been performed. The performance of searching has also been improved in the electronic document filing in such a manner that an optical character recognition (OCR) process is executed on a scanned image and the result of the character recognition process to serve as an attribute value is combined with the image. For example, Japanese Unexamined Patent Application Publication No. 2007-233913 discloses the following process. Specifically, the item name of each of items to be extracted from a document image and a relative location of an item value in the document image are registered in a database. In the relative location, the item value is to be present relative to the item name. Character recognition is performed on a document image, and a character string corresponding to the item name of the item to be extracted is obtained from the result of the character recognition. A character string in the relative location in which the item value is to be present relative to the obtained item name is extracted as the item value relative to the item name.

Japanese Unexamined Patent Application Publication No. 2006-185342 describes an information processing apparatus that performs semantic-attribute-based classification of character strings each assigned to one of multiple semantic attributes in a character string group. In the information processing apparatus, databases105to107are referred to on a per character string basis, each character string is analyzed, and a score indicating the likelihood of assignment of the character string to the semantic attribute is calculated for the character string by using multiple scoring methods. The character string is then classified on the basis of a total value of the scores that is calculated on the basis of the combination pattern of the assignment of the character string to the semantic attribute. Japanese Unexamined Patent Application Publication No. 2004-240488 describes a process executed when a paper document is scanned to generate an electronic document. In the process, searching is performed on results of character recognition, and a character string considered to describe a date when the document is generated is found and then assigned as a file attribute to the document.

SUMMARY

Aspects of non-limiting embodiments of the present disclosure relate to providing technology for assigning an attribute to image data not having undergone definition of the attribute, the technology eliminating the need for setting the attribute in advance by a user.

Aspects of certain non-limiting embodiments of the present disclosure address the features discussed above and/or other features not described above. However, aspects of the non-limiting embodiments are not required to address the above features, and aspects of the non-limiting embodiments of the present disclosure may not address features described above.

According to an aspect of the present disclosure, there is provided an information processing apparatus including a processing unit, an extraction unit, a memory unit, a determination unit, and an assignment unit. The processing unit executes a character recognition process. The extraction unit extracts at least one area located within a predetermined range from a first area that is included in a designated image and that is designated to undergo the character recognition process. The at least one area is a second area. The memory unit stores an attribute on a per character string basis. The determination unit determines, on a basis of the attribute stored by the memory unit, an attribute corresponding to a character string recognized as one or more characters from the first area by the processing unit and a character string recognized as one or more characters from the second area by the processing unit. The assignment unit assigns the determined attribute to the designated image.

