{'fraction_non_alphanumeric': 0.057119205298013245, 'fraction_numerical': 0.006622516556291391, 'mean_word_length': 5.1177215189873415, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Research on Component Query Matching Algorithm for Component Library Based on Facet Description

More excellent containment matching model is proposed based on component inclusion matching model. Moreover, matching cost algorithm is analyzed to get inclusive matching model. Therefore, efficiency of recall and precision of component are significantly improved comparing with traditional component query situation. Introduction Representation and retrieval of component are the two main core technologies of reusable software component library. Representation of component facet and corresponding retrieval technology has been widely applied. Among them, both REBOOT and NATO put forward classification scheme of reusable software component. In addition, retrieval of component library takes into account incomplete description of component need to query. Query matching should have a certain degree of flexibility, not only can give the user returns but also corresponding matching degree, to provide useful information for the users to reuse components. At the same time, classification scheme of facet in each component library may be completely different. Therefore, the user may need to span multiple component libraries to find appropriate component. How to realize the retrieval component across the component library is an urgent problem to be solved [1-2]. Facet Description of Component and Query Representation Tree Representation of Component Facet. With the application of component library based on network, XML has been described as a component mark-up language. XML document of a component can be mapped to an unordered labelled tree. At present, classification describing model is adopted on most of component facet. Figure 1 showed a facet document based on XML component facet and its tree representation. Fig.1 Facet Document and Tree Representation of Component Component Query Representation. Component query can be expressed as a query tree, i.e., names of facet and sub-facet are turned into corresponding nodes and their sub-nodes, facet terms value needed to be inquired is turned into leaf nodes, and a virtual root node is used to combine them into a the query tree, as shown in figure 2. International Conference on Information Sciences, Machinery, Materials and Energy (ICISMME 2015) © 2015. The authors Published by Atlantis Press 926 Fig.2 Component Query Tree Therefore, component query is turned into the matching between query trees and facet description tree in the library. Many research results have been got on tree matching problems. Tree embedding or tree inclusion are directly related to the matching, that is, the best embedding or contain position of one tree in another is found. Matching Model of Component Query In order to analyze and states matching model of this paper, definition of tree inclusion is introduced, and tolerable definition is given. The meaning of component retrieval and matching model is analyzed combing with the features of component query. Definition 1 Tree Inclusion / Tree Embedding Suppose Q= (V, E, root (Q)) and D= (W, F, root (D)) are two unordered labelled tree. If there is a mapping f V → W, which satisfies the following conditions: (1)u=v⇔f(u)=f(v), u,v∈Domain(f)=V (2)label(v)=label(f(v)) (3)u=parent(v) ⇔f(u)=ancestor(f(v)) We say Q is a included tree, while D contains Q. If the above condition (3) is changed into u=parent (v) ⇔ f (u) =parent (f (v)), there is a embedding from Q to D. Definition 2 Inclusion Matching Suppose Q= (V, E, root (Q)) and D= (W, F, root (D)) are two unordered labelled tree V 'V and W' W. If for all u, v ∈ V ' , there is a mapping f V′→W′meeting the following conditions: (1)u=v =>f(u)=f(v), u,v∈Domain(f) (2)label(u)≈label(f(u)) (3)u=ancestor(v) =>f(u)=ancestor(f(v)) Then f is called a tree inclusion matching from Q to D, referred to as the tree inclusion or inclusion matching. Inclusion matching is shown in Figure 3 (a). Comparing with the definition of tree containment or tree embedding, it breaks through domain constraints of f and allows redundant query information, which fundamentally creates condition for component query recall, and only requires ancestor-descendant relationship. Therefore, it allows missing layer of participating node information for matching to improve recall ratio. Definition 3 Containment Matching Q= (V, E, root (Q)) and D= (W, F, root (D)) are two unordered labelled tree, V ′ V and W ′ W. If for all u, v ∈ V', there exists a mapping f from V' to W ' meeting the following conditions: (1)u=v=>f(u)=f(v),u,v∈Domain(f) (2)label(u)≈label(f(u)) (3)u=ancestor(v) =>f(u)=ancestor(f(v)) Then f is called a tolerable matching from Q to D, referred to as the tree tolerant or containment matching. Tolerable matching is a special case of inclusion matching. As shown in Figure 3 (b),