Web pages accessible via the Internet contain a vast amount of information. A web page may contain information about various types of objects such as products, people, papers, organizations, and so on. For example, one web page may contain a product review of a certain model of camera, and another web page may contain an advertisement offering to sell that model of camera at a certain price. As another example, one web page may contain a journal article, and another web page may be the homepage of an author of the journal article. A person who is searching for information about an object may need information that is contained in different web pages. For example, a person who is interested in purchasing a certain camera may want to read reviews of the camera and to determine who is offering the camera at the lowest price.
To obtain such information, a person would typically use a search engine to find web pages that contain information about the camera. The person would enter a search query that may include the manufacturer and model number of the camera. The search engine then identifies web pages that match the search query and presents those web pages to the user in an order that is based on how relevant the content of the web page is to the search query. The person would then need to view the various web pages to find the desired information. For example, the person may first try to find web pages that contain reviews of the camera. After reading the reviews, the person may then try to locate a web page that contains an advertisement for the camera at the lowest price.
Web search systems have not been particularly helpful to users trying to find information about a specific product because of the difficulty in accurately identifying objects and their attributes from web pages. Web pages often allocate a record for each object that is to be displayed. For example, a web page that lists several cameras for sale may include a record for each camera. Each record contains attributes of the object such as an image of the camera, its make and model, and its price. Web pages contain a wide variety of layouts of records and layouts of attributes within records. Systems identifying records and their attributes from web pages are typically either template-dependent or template-independent. Template-dependent systems may have templates for both the layout of records on web pages and the layout of attributes within a record. Such a system finds record templates that match portions of a web page and then finds attribute templates that match the attributes of the record. Template-independent systems, in contrast, typically try to identify whether a web page is a list page (i.e., listing multiple records) or a detail page (i.e., a single record). The template-independent system then tries to identify records from meta-data of the web page (e.g., tables) based on this distinction. Such systems may then use various heuristics to identify the attributes of the records.
A difficulty with these systems is that records are often incorrectly identified. An error in the identification of a record will propagate to the identification of attributes. As a result, the overall accuracy is limited by the accuracy of the identification of records. Another difficulty with these systems is that they typically do not take into consideration the semantics of the content of a portion that is identified as a record. A person, in contrast, can easily identify records by factoring in the semantics of their content.
A method and system for labeling object information of an information page is provided. A labeling system identifies an object record of an information page based on the labeling of object elements within an object record and labels object elements based on the identification of an object record that contains the object elements. Thus, the labeling system jointly identifies records and label elements in a way that is more effective than if performed separately. To jointly identify the records and label the elements, the labeling system generates a hierarchical representation of blocks of an information page with blocks being represented as vertices of the hierarchical representation. The labeling system identifies records and elements within the records by propagating probability-related information of record labels and element labels through the hierarchy of the blocks. The labeling system generates a feature vector for each block to represent the block and calculates a probability of a label for a block being correct based on a score derived from the feature vectors associated with related blocks. The labeling system may use a propagation technique to propagate the effect of a labeling of one block to the other blocks within the hierarchical representation. The labeling system searches for the labeling of records and elements that has the highest probability of being correct.
A labeling system uses a hierarchical conditional random fields (“CRF”) technique to label the object elements.
This Summary is provided to introduce a selection of concepts in a simplified form that are further described below in the Detailed Description. This Summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
A method and system for labeling object information of an information page is provided. In one embodiment, a labeling system identifies an object record of an information page, such as a web page, based on the labeling of object elements within an object record and labels object elements based on the identification of an object record that contains the object elements. To identify the records and label the elements, the labeling system generates a hierarchical representation of blocks of a web page with blocks being represented as vertices of the hierarchical representation. A block may represent a collection of information of a web page that is visually related. a root block represents the entire web page, a leaf block is an atomic unit (such as an element of a record), and inner blocks represent collections of their child blocks. The labeling system identifies records and elements within the records by propagating probability-related information of record labels and element labels through the hierarchy of the blocks. The labeling system generates a feature vector for each block to represent the block. The labeling system calculates a probability of a label for a block being correct based on a score derived from the feature vectors associated with related blocks. A related block may be a block that is either a parent block or a nearest sibling block within the hierarchical representation. A collection of related blocks is referred to as a “clique.” The labeling system may define feature functions that generate scores, which are combined to give an overall score for a label for a block. A feature function may evaluate the features of a block itself, the combined features of a block and a related block, and the combined features of a block and all its related blocks. The labeling system may use a propagation technique to propagate the effect of a labeling of one block to the other blocks within the hierarchical representation. The labeling system searches for the labeling of records and elements that has the highest probability of being correct.
In one embodiment, the labeling system uses a vision-based page segmentation (“VIPS”) technique to generate a hierarchical representation of blocks of a web page. One VIPS technique is described in Cai, D., Yu, S., Wen, J., and Ma, W., “VIPS: A Vision-Based Page Segmentation Algorithm,” Microsoft Technical Report, MSR-TR-2003-79, 2003, which is hereby incorporated by reference. A VIPS technique uses page layout features (e.g., font, color, and size) to construct a “vision tree” for a web page. The technique identifies nodes from the HTML tag tree and identifies separators (e.g., horizontal and vertical lines) between the nodes. The technique creates a vision tree that has a vertex, referred to as a block, for each identified node. The hierarchical representation of the blocks can effectively keep related blocks together while separating semantically different blocks.
In one embodiment, the labeling system performs a joint optimization for record identification and element (or attribute) labeling. The labeling system generates a feature vector for each block. The feature vectors are represented as X={X0, X1, . . . , XN-1} where Xi represents the feature vector for block i. The labeling system represents the labels of the blocks as the vectors Y={Y0, Y1, . . . , YN-1} where Yi represents the label for block i. The goal of the labeling system is to calculate the maximum posterior probability of Y and extract data from the assignment as represented by the following:
y*=arg maxp(y|x)
where y* represents the labeling with the highest probability for the block represented by the feature vector x. The labeling system thus provides a uniform framework for record identification and attribute labeling. As a result, records that are wrongly identified and cause attribute labeling to perform badly will have a low probability and thus not be selected as the correct labeling. Furthermore, since record identification and attribute labeling are conducted simultaneously, the labeling system can leverage the attribute labels for a better record identification.
In one embodiment, the labeling system uses a hierarchical conditional random fields (“CRF”) technique to label the records and elements of the vision tree representing a web page. CRFs are Markov random fields globally conditioned on the observations X. The graph G=(V, E) is an undirected graph of CRFs. According to CRFs, the conditional distribution of the labels y given the observations x has the form represented by the following:
where C represents a set of cliques in graph G, y|c represents the components of y associated with clique c, φc represents a potential function defined on y|c, and Z is a normalization factor.
where gk, fk, and hk represent feature functions defined on three types of cliques (i.e., vertex, edge, and triangle, respectively); μk, λk, and γk represent the corresponding weights; vεV; eεE; and t is a triangle, which is also a maximum clique. Although the feature functions generate real values, the labeling system may be implemented so that they are Boolean, that is, true if the feature matches and false otherwise. An example feature function is represented by the following:
which means that if the content of vertex x is capitalized, then the function returns a value of true when the label yi is “Name.”
The labeling system determines weights for the feature functions using the training data D={(y′,x′)}i=1N with the empirical distribution {tilde over (p)}(x,y) where N is the number of sets of labeled observations in the training data. The labeling system represents the log-likelihood of {tilde over (p)}(x,y) with respect to a conditional model p(y|x,Θ) according to the following:
where Θ={μ1, μ2, . . . ; λ1, λ2, . . . ; γ1, γ2} represents the set of weights for the feature functions. The labeling system identifies the weights as the values that optimize the concave log-likelihood function. The labeling system may use various techniques to determine the weights. For example, the labeling system can use techniques used in other maximum-entropy models as described in Lafferty, J., McCallum, A., & Pereira, F., “Conditional Random Fields: Probabilistic Models for Segmenting and Labeling Sequence Data,” in Proc. ICML, 2001. The labeling system may also use a gradient-based L-BFGS as described in Liu, D. C., & Nocedal, J., “On The Limited Memory BFGS Method for Large Scale Optimization,” Mathematical Programming 45, pp. 503-528, 1989. The gradient-based model represents each element of the gradient vector as follows:
where E{tilde over (p)}(y,x)[fk] is the expectation with respect to the empirical distribution and Ep(y|x,Θ)[fk] is the expectation with respect to the conditional model distribution. For example, the expectations of fk are:
where e=(i, j) is an edge.
The labeling system calculates the expectation for the empirical distribution once and calculates the marginal probabilities for the model distribution during each iteration while solving the optimization problem of Equation 4. Since the graph of
After the junction tree has been constructed, the labeling system initializes all the potentials of the junction tree to have a value of 1 and multiplies the potential of a vertex, an edge, or a triangle into the potential of any one clique node of T which covers its variables. The potential of a vertex v, an edge e, and a triangle t is represented by the following:
The labeling system in one embodiment uses a two-phase schedule algorithm to propagate beliefs within the junction tree. A two-phase schedule algorithm is described in Jensen, F., Lauritzen, S., and Olesen, K., “Bayesian Updating in Causal Probabilistic Networks by Local Computations,” Computational Statistics Quarterly, 4:269-82, 1990. The algorithm uses a collection and distribution phase to calculate the potentials for the cliques and separators. One skilled in the art will appreciate that the labeling system can use other message passing techniques to propagate beliefs. Upon completion of the distribution phase, the potentials represent marginal potentials that are used by the labeling system to guide finding the solution for the weights that best match the training data.
After learning the weights, the labeling system uses the weights to find labels for the blocks of web pages. The labeling system uses the VIPS technique, the junction tree algorithm, and a modified two-phase schedule algorithm to find the best labeling. The labeling system generates a vision tree from the web page and generates a junction tree. The labeling system modifies the two-phase schedule algorithm by replacing its summations with maximizations. The best labeling for a block is found from the potential of any clique that contains the block.
The computing devices on which the labeling system may be implemented may include a central processing unit, memory, input devices (e.g., keyboard and pointing devices), output devices (e.g., display devices), and storage devices (e.g., disk drives). The memory and storage devices are computer-readable media that may contain instructions that implement the labeling system. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium, such as a signal on a communications link. Various communications links may be used, such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection.
The labeling system may be used in various operating environments that include personal computers, server computers, hand-held or laptop devices, multiprocessor systems, microprocessor-based systems, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments that include any of the above systems or devices, and the like.
The labeling system may be described in the general context of computer-executable instructions, such as program modules, executed by one or more computers or other devices. Generally, program modules include routines, programs, objects, components, data structures, and so on that perform particular tasks or implement particular abstract data types. Typically, the functionality of the program modules may be combined or distributed as desired in various embodiments.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. In particular, the two-dimensional CRF technique may be used to label any type of observations that have a two-dimensional relationship. Accordingly, the invention is not limited except as by the appended claims.
Number | Date | Country | |
---|---|---|---|
Parent | 11461400 | Jul 2006 | US |
Child | 12776308 | US |