A case-based reasoning approach for unknown class invoice processing

Similar documents
A case-based reasoning approach for invoice structure extraction

Case-based Reasoning for Invoice Analysis and Recognition

Semantic Label and Structure Model based Approach for Entity Recognition in Database Context

DOCUMENT IMAGE AND ZONE CLASSIFICATION THROUGH INCREMENTAL LEARNING

BoxPlot++ Zeina Azmeh, Fady Hamoui, Marianne Huchard. To cite this version: HAL Id: lirmm

Multimedia CTI Services for Telecommunication Systems

Structuring the First Steps of Requirements Elicitation

Fault-Tolerant Storage Servers for the Databases of Redundant Web Servers in a Computing Grid

DANCer: Dynamic Attributed Network with Community Structure Generator

Change Detection System for the Maintenance of Automated Testing

A Voronoi-Based Hybrid Meshing Method

Every 3-connected, essentially 11-connected line graph is hamiltonian

Tacked Link List - An Improved Linked List for Advance Resource Reservation

How to simulate a volume-controlled flooding with mathematical morphology operators?

An FCA Framework for Knowledge Discovery in SPARQL Query Answers

Comparator: A Tool for Quantifying Behavioural Compatibility

Prototype Selection Methods for On-line HWR

Traffic Grooming in Bidirectional WDM Ring Networks

Regularization parameter estimation for non-negative hyperspectral image deconvolution:supplementary material

Visual perception of unitary elements for layout analysis of unconstrained documents in heterogeneous databases

Service Reconfiguration in the DANAH Assistive System

Assisted Policy Management for SPARQL Endpoints Access Control

Reverse-engineering of UML 2.0 Sequence Diagrams from Execution Traces

Relabeling nodes according to the structure of the graph

Setup of epiphytic assistance systems with SEPIA

Syrtis: New Perspectives for Semantic Web Adoption

QAKiS: an Open Domain QA System based on Relational Patterns

HySCaS: Hybrid Stereoscopic Calibration Software

Blind Browsing on Hand-Held Devices: Touching the Web... to Understand it Better

Representation of Finite Games as Network Congestion Games

Lossless and Lossy Minimal Redundancy Pyramidal Decomposition for Scalable Image Compression Technique

Efficient implementation of interval matrix multiplication

Light field video dataset captured by a R8 Raytrix camera (with disparity maps)

An Efficient Numerical Inverse Scattering Algorithm for Generalized Zakharov-Shabat Equations with Two Potential Functions

YANG-Based Configuration Modeling - The SecSIP IPS Case Study

Real-time FEM based control of soft surgical robots

Linked data from your pocket: The Android RDFContentProvider

Study on Feebly Open Set with Respect to an Ideal Topological Spaces

An Experimental Assessment of the 2D Visibility Complex

QuickRanking: Fast Algorithm For Sorting And Ranking Data

Robust IP and UDP-lite header recovery for packetized multimedia transmission

Mokka, main guidelines and future

NP versus PSPACE. Frank Vega. To cite this version: HAL Id: hal

A Practical Evaluation Method of Network Traffic Load for Capacity Planning

LaHC at CLEF 2015 SBS Lab

Real-Time Collision Detection for Dynamic Virtual Environments

Quality of Service Enhancement by Using an Integer Bloom Filter Based Data Deduplication Mechanism in the Cloud Storage Environment

Computing and maximizing the exact reliability of wireless backhaul networks

Malware models for network and service management

KeyGlasses : Semi-transparent keys to optimize text input on virtual keyboard

Catalogue of architectural patterns characterized by constraint components, Version 1.0

YAM++ : A multi-strategy based approach for Ontology matching task

Spectral Active Clustering of Remote Sensing Images

UsiXML Extension for Awareness Support

Moveability and Collision Analysis for Fully-Parallel Manipulators

Multi-atlas labeling with population-specific template and non-local patch-based label fusion

A Resource Discovery Algorithm in Mobile Grid Computing based on IP-paging Scheme

Motion-based obstacle detection and tracking for car driving assistance

Integration of an on-line handwriting recognition system in a smart phone device

SIM-Mee - Mobilizing your social network

Very Tight Coupling between LTE and WiFi: a Practical Analysis

Full Text Search Engine as Scalable k-nearest Neighbor Recommendation System

Branch-and-price algorithms for the Bi-Objective Vehicle Routing Problem with Time Windows

Natural Language Based User Interface for On-Demand Service Composition

Generative Programming from a Domain-Specific Language Viewpoint

Taking Benefit from the User Density in Large Cities for Delivering SMS

Multi-font Numerals Recognition for Urdu Script based Languages

Handwritten text segmentation using blurred image

ASAP.V2 and ASAP.V3: Sequential optimization of an Algorithm Selector and a Scheduler

Decentralised and Privacy-Aware Learning of Traversal Time Models

Linux: Understanding Process-Level Power Consumption

X-Kaapi C programming interface

Comparison of spatial indexes

The Connectivity Order of Links

SDLS: a Matlab package for solving conic least-squares problems

Zigbee Wireless Sensor Network Nodes Deployment Strategy for Digital Agricultural Data Acquisition

Haar-like-features for query-by-string word spotting

A Methodology for Improving Software Design Lifecycle in Embedded Control Systems

Fuzzy sensor for the perception of colour

A 64-Kbytes ITTAGE indirect branch predictor

THE COVERING OF ANCHORED RECTANGLES UP TO FIVE POINTS

A N-dimensional Stochastic Control Algorithm for Electricity Asset Management on PC cluster and Blue Gene Supercomputer

Scalewelis: a Scalable Query-based Faceted Search System on Top of SPARQL Endpoints

Handwritten and Printed Text Separation in Real Document

A million pixels, a million polygons: which is heavier?

MUTE: A Peer-to-Peer Web-based Real-time Collaborative Editor

FIT IoT-LAB: The Largest IoT Open Experimental Testbed

Teaching Encapsulation and Modularity in Object-Oriented Languages with Access Graphs

Synthetic On-line Handwriting Generation by Distortions and Analogy

Primitive roots of bi-periodic infinite pictures

Vector Representation of Graphs: Application to the Classification of Symbols and Letters

The SANTE Tool: Value Analysis, Program Slicing and Test Generation for C Program Debugging

Kernel perfect and critical kernel imperfect digraphs structure

Simulations of VANET Scenarios with OPNET and SUMO

DSM GENERATION FROM STEREOSCOPIC IMAGERY FOR DAMAGE MAPPING, APPLICATION ON THE TOHOKU TSUNAMI

The New Territory of Lightweight Security in a Cloud Computing Environment

Comparison of radiosity and ray-tracing methods for coupled rooms

The Proportional Colouring Problem: Optimizing Buffers in Radio Mesh Networks

Modelling and simulation of a SFN based PLC network

Deformetrica: a software for statistical analysis of anatomical shapes

Transcription:

A case-based reasoning approach for unknown class invoice processing Hatem Hamza, Yolande Belaïd, Abdel Belaïd To cite this version: Hatem Hamza, Yolande Belaïd, Abdel Belaïd. A case-based reasoning approach for unknown class invoice processing. 14th IEEE International Conference on Image Processing - ICIP 2007, Sep 2007, San Antonio, United States. IEEE, 5, pp.v-353 V-356, 2007, <10.1109/ICIP.2007.4379838>. <inria- 00176640> HAL Id: inria-00176640 https://hal.inria.fr/inria-00176640 Submitted on 25 Jan 2008 HAL is a multi-disciplinary open access archive for the deposit and dissemination of scientific research documents, whether they are published or not. The documents may come from teaching and research institutions in France or abroad, or from public or private research centers. L archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des établissements d enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

A CASE-BASED REASONING APPROACH FOR UNKNOWN CLASS INVOICE PROCESSING Hatem Hamza ITESOFT, LORIA, University Nancy 2 France. Yolande Belaïd, Abdel Belaïd LORIA, University Nancy 2 France. ABSTRACT This paper introduces an invoice analysis approach using Case- Based Reasoning (CBR). CBR is used to analyze and interpret new invoices thanks to the previous processing experiences. Each new document is segmented into structures and interpreted thanks to a structure database. Interpreting a new document s structures relies on graph edit distance as well as on string edit distance. This paper focuses on document structure extraction as well as on document interpretation via its structures interpretation. The proposed system reaches an extraction and interpretation rate of 76.33%. Index Terms Case-based reasoning, Document image processing 1. INTRODUCTION Form and invoice analysis systems have to be fast, accurate and human independent as much as possible. The variation of information between documents makes the processing task really difficult. Two major elements can be found in invoices: tables and key-words. Table extraction and processing has been a subject of interest during the last years. Some approaches use the image pixels to find tables [1]. Some other works rely on the data extracted from the image (words, text) to detect and interpret tables. In [2], a morphological approach for table fields tagging was proposed. By analyzing the nature of each word in the table zone, each field is given an attribute (an intepretation: total amount, code...). However, this was applied on tables that were already extracted. A very good survey about table extraction and understanding can be found in [3]. Document analysis using key-words covers many research aspects. While some works focused on the classification of documents using key-words [4], some other works[5] [6] used them to analyze and interpret the information contained in forms and invoices. The approach proposed in this paper processes different documents without any prior knowledge on them. The main idea of this work is to analyze and interpret documents via the analysis and interpretation of each structuring elements (tables and key-words association). This paper is organized as the following: section 2 introduces briefly CBR and its use in our system. Sections 3 and 4 present our system s architecture. Finally, section 5 shows the obtained results, their interpretation and some perspectives. 2. CASE-BASED REASONING CBR is a powerful problem solving strategy that uses previous experiences to process new given problems [7]. A problem is the input of any CBR system. It is the first component of a case in the CBR terminology (a case=problem, solution). Its resolution (to find the solution) consists in three main phases: similar case retrieval from the database, adaptation of the solution of the similar case to the studied problem and learning of new solved cases. In our approach, we define two types of cases, which correspond to two types of structuring elements. The flow of our approach, as shown in figure 1, is based on two main steps: problem elaboration and local solving. Fig. 1. Flow of our approach Problem elaboration consists in information extraction from the document. These indices are either key-words (KW) (e.g. total, street, amount ) and their spatial relationships, or table rows. It is obvious that the extraction of these indices without any interpretation is useless. The solution corresponds then to the interpretation of the extracted information. In order to have an interpretation of the whole document, our system processes it structure by structure (local solving). In this paper, we focus on problem elaboration and local solving. We show that even if all the invoices belong to new classes, our 1-4244-1437-7/07/$20.00 2007 IEEE V - 353 ICIP 2007

system is able to extract and interpret the data contained in these documents. 3. PROBLEM ELABORATION The system input is a raw document given by OCR. The OCR file contains the list of words and coordinates. The document is represented by the set of words: W i,i=1..n. 3.2. PS extraction PS are consecutive horizontal lines having similar patterns. This is the case of a table. Figure 3 shows a document containing a PS composed of 4 horizontal lines having the pattern ACAAAAA. This means that there are one numerical column, one alphabetical column and five other numerical columns. 3.1. Data etxraction The first step consists in re-organizing the words in a more logical way. First, each word is given three attributes: position, key-word and type. The attribute type is represented by an alphabetical character: for example, A for numerical, B for alphabetical, etc. A word is tagged as a key-word if it belongs to a predefinite list of key-words. These key-words are words that occur frequently in administrative documents. They can be in several languages. The list of key-words is updated regularly. Then, fields are constituted by gathering neighbour words horizontally. Each successive pair of words (Wi, Wj) in a field verifies d(wi,wj) <δwhere δ is a threshold depending on the character size of the field words. A field is characterized by two attributes: position and type. The type of a field is deduced from its words types. For example, if a field contains an alphabetical and a numerical word, then it will be tagged C for alphanumerical. From fields, we extract horizontal lines and vertical blocks. Fields neighbourhoods and alignments are used to constitute these lines and blocks. A vertical block is a set of fields vertically aligned. Two vertical fields Fi and Fj are in the same vertical block if d(fi,fj) <βwhere β is a threshold depending on the fields size and position. Similarly, we use a threshold for horizontal fields. Figure 2 shows a field (small box), a horizontal line (in graytone) and a vertical block (in the bold box). A line or a block have the following attributes: position and pattern. A pattern is string composed of fields tags list. For example, if the fields in the line have the tags: C, B, B and C, then the pattern is CBBC. These patterns will be used in table extraction. After these elementary information are extracted, high level structures are extracted. They can be either pattern structures (PS) when related to tables or key-word structures (KWS) when related to local arrangements of key-words. Figure 3 shows a document containing 4 KWS and a PS. The KWS are in gray-tone, whereas the PS is the bold box. Fig. 2. A field, a horizontal line, and a vertical block Fig. 3. An invoice containing 4 KWS and a PS The PS extraction process contains three steps: For each horizontal line, a list of neighbour lines is constitued using edit distance on their strings (i.e. patterns). We use a threshold (usually equal to 1 in order to accept only 1 transformation between strings) between line patterns to find neighbours; The list of each group of neighbour lines is studied based on the fields positions. In figure 4, the edit distance between the patterns is null, as they represent the same string ABB. However they do not correspond to the same PS because of the difference of the spatial positions. To avoid such confusions when the edit distance is null, we take into account patterns fields positions as the following. For every list of neighbour lines HLN a new matching value is computed. This value depends on the number of exact vertical alignment of fields having the same tag. The final matching value is the ratio: matching fields RT = fieldsinhln where X is the number of elements in X. The higher RT is (RT tends to 1), the more probable HLN is a PS. If RT =1, HLN is a singleton (this case will be eliminated because it is meaningless for table) or HLN is a perfect table. V - 354

Fig. 4. Two patterns with edit distance=0 After processing the whole document, the chosen HLN is the one maximizing RT. PS is then the best HLN candidate. This method can extract tables only when there are at least two table lines in the document. 3.3. KWS extraction KWS are constitued from neighbour key-words like road, zip-code, name for an address. KWS are very important in invoices as many details are expressed in such structures. We use graphs to represent KWS (key-words in vertices, and spatial relationships on edges). KWS maintain the spatial relationships as well as the semantic proximity between keywords. For example, when the key-words ( Total, tax, and Amount ) are extracted together in a KWS, we know in advance that a relation exists between these words. This is different from extracting and interpreting each word separately. 3.4. Cases CBR requires the definition of cases: a problem and its corresponding solution. According to the problem elaboration step, two different cases are possible: 1. KWS case: the problem is the graph of key-words contained in a structure. The solution is the interpretation of each key-word. For example, the solution of street is the name of the street and the number corresponding to the address (e.g 20 Albert street ). In this case, KWS solution is the set of the key-words solutions; 2. PS case: the problem is the pattern (e.g ABBB ) representing the table and the solution is the interpretation of each table column. 4. LOCAL SOLVING The system builds a solution based on the structures already processed in other documents and stored in a structure database. 4.1. KWS Solving The solving procedure acts as the following. For each structure in the document, the nearest structure in the database is retrieved. The problem is compared to the KWS cases of the database. The solution of the nearest structure is adapted. Graph edit distance is used to find the nearest case. We used edit distance as we look for graph isomorphism, or at least, subgraph isomorphism. The cost function used to compute the graph edit distance has the same cost on vertices edit operations and edges edit operations. Other cost functions will be studied in the future. The nearest structures solutions are now adapted to the document structures. As the cases in the database have already a correct solution, the adaptation consists in taking the solution of each KW and trying to find a corresponding solution in the processed document. For example, if the solution corresponding to a KW total in the database case has the properties real number + right, the system will look for a real number on the right of total on the same line in the processed document. If an answer exists, then it is proposed as a solution for this KW. If a KW can not be solved, some universal knowledge related to these KW can be used. For example, it is usual that the KW total is followed by a numerical. The precise nature of this numerical (real, integer) depends on the document, but this information (numerical) is always valid. A rule basis containing general rules associated with key-words was built, in order to complete any partial solution of a KWS. This basis helped us completing some KWS solutions. We note here that this rule basis is not sufficient on its own to interpret a KWS. As rules are very general and are not related to any concrete case, the rule basis constitutes just a help to the system to find a solution. If no solution is found by the system, the user can then propose a solution, which will be learnt by the system (by enriching the database) in order to avoid the human intervention in other cases. The example in 5 shows a KWS which nearest KWS in the database resolves four out of five KW. By using the rule basis, a complete solution can be found. Fig. 5. A KWS. Only the KW Total is solved by the rule basis. The learning step is done by injecting each complete solution in the database. This step is still under study in order to have a more intelligent learning. 4.2. PS Solving Each extracted PS is compared with the database cases to retrieve the nearest structure. As PS are represented with strings, their patterns are compared using string edit distance. When a similar PS is found (same pattern, or with a maximum of one transformation), the table columns of the extracted case are given the tags of the database case, unless the rule between the fields of the tables do not match. In this case, the system tries to find the rule between extracted fields by trying the V - 355

rules in other close PS cases (close PS cases with more than one transformation) until a valid rule is found. 5. EXPERIMENTS AND FUTURE WORKS. Our approach was tested on 800 documents. Local solving is performed on KWS and PS. The structure database is enriched gradually by the solved structures. The more structure cases are processed, the more the database becomes rich, and the more solving becomes easier for the system. The database contained initially 300 structures. Only 20% of the tested structures have a complete similar case in the database. The remaining cases are taken from several other documents which are not related to the tested documents. We chose to test our system in this way to show its ability to find a solution for a given problem even if it has never been studied before. The results are described thanks to three different measures as in 1. In this equation, X can be a document, a KWS or a PS. correct solutions R X = solutions in ground truth X. (1) A correct solution corresponds to a KW s solution or to a field in a PS that has been correctly extracted and interpreted. The results are given in table 1. R doc R kws R ps Local Solving 76.33% 76.38% 76.28% Table 1. Results of our approach In KWS local solving, errors are due to: 16.57% of system errors (bad solution, no solution found, confusion with other solutions) and 8.08% of OCR errors. In PS local solving, errors are due to: 16.66% of system errors (a bad detection of table lines or a bad proposed solution, missing lines, no detection of table) and 7.14% of OCR and segmentation errors (for example, the word 23.7 is read by the OCR as 23.T). The OCR used in this application is a professional one used by ITESOFT. OCR errors are not just due to the software performance, but they depend essentially on the quality of documents. In our dataset, we had about 8% of documents of very poor quality (this can be caused by the original quality of the document, or by a bad scanning). The results are satisfying from an industrial point of view as we are working on invoices of unknown classes i.e no relation between a document and the next one exists. However, these results can be improved in many ways. Two immediate perspectives are being studied. We are focusing on problem elaboration and especially on PS extraction. Table headers will be used in addition to the horizontal lines patterns. In this way, we can even consider PS as a special case of KWS. The learning step as well as the structure database indexing are also important steps in this work. After thousands of processed documents, the structure databse can contain thousands of structure cases which have to be indexed so that case retrieval remains always fast and accurate. 6. CONCLUSION In this paper, a CBR approach for multi class invoice processing was proposed. The different processing steps, starting by document structuring, and finishing by document interpretation were exposed. Some improvements need to be done in order to enhance the results. The final use of this system will be the processing of invoices from both unknown and known classes. 7. REFERENCES [1] S. Mandal, S. P. Chowdhury, A. K. Das, and Bhabatosh Chanda, A simple and effective table detection system from document images, IJDAR, vol. 8, no. 2-3, pp. 172 182, 2006. [2] Yolande Belaïd and Abdel Belaïd, Morphological tagging approach in document analysis of invoices, in ICPR, 2004, pp. 469 472. [3] A. Costa, A. M. Jorge, and L. Torgo, Design of an end-to-end method to extract information from tables, IJDAR, vol. 8, no. 2, pp. 144 171, 2006. [4] Adam Schenker, Mark Last, Horst Bunke, and Abraham Kandel, Comparison of distance measures for graphbased clustering of documents, in GbRPR, 2003, pp. 202 213. [5] H. Sako, M.Seki, N. Furukawa, H.Ikeda, and A.Imaizumi, Form reading based on form-type identification and form-data recognition, in ICDAR, Scotland, 2003. [6] Francesca Cesarini, Enrico Francesconi, Marco Gori, and Giovanni Soda, Analysis and understanding of multiclass invoices, IJDAR, vol. 6, no. 2, pp. 102 114, 2003. [7] A. Aamodt and E. Plaza, Case-based reasoning: Foundational issues, methodological variations, and system approaches, in IOS press, 1994. V - 356