4. Semantic similarity measures

Measuring the similarity between two concepts is not a new topic. Throughout the last decades, many measures of similarity have been reported using different perspectives: syntactic, semantic, contextual, etc. In this work, we use a set of semantic similarity measurements based on WordNet.<sup>1</sup> Computing similarity

<sup>1</sup> https://wordnet.princeton.edu/

between all Web services in the collection is a process executed in pairs. Let W be the tuple that represents all Web services in the collection as follows:

$$\mathbf{W} = \langle \mathbf{P}, \mathbf{I}, \mathbf{O} \rangle \tag{1}$$

5. Artificial Bee Colony algorithm

DOI: http://dx.doi.org/10.5772/intechopen.85200

Bio-Inspired Hybrid Algorithm for Web Services Clustering

model of the Bee Colony consists of:

in the nest.

Figure 5.

17

ABC algorithm general workflow.

to exploit a food source.

capable of sharing this information.

The ABC algorithm has different modes of behavior:

The Artificial Bee Colony (ABC) algorithm is an optimization technique that simulates the foraging behavior of honey bees and has been successfully applied to various practical problems and is a nature-inspired and swarm intelligence method that has been applied in different scenarios with good results. The ABC algorithm was proposed in 2005 by Karaboga [18, 19]; accordingly, the collective intelligence

a. Employed foragers which are bees assigned (employed) to a particular food source and are exploiting it. They carry information about the food source, distance and direction to the nest and the profitability of the source, and are

b.Unemployed foragers are bees that are continuously searching for food sources. These unemployed bees are subdivided into scouts, bees that search on the surrounding environment for new food sources, and onlookers, bees that wait

a. Exploration is the task executed by unemployed bees to find new food sources.

c. Recruitment is the action that an unemployed bee executes with forager bees

d.Abandonment of a nectar source occurs when a better food source is found.

b.Exploitation is the task executed by employed bees on a food source.

where P, represents all operation names; I, is the set of input parameters; O, is the set of output parameters.

In particular, in this work the similarity measures were applied only on the operation names. Therefore, the similarity calculation takes as input a matrix of all operation names in the collection of Web services, that is, as follows:

$$(\mathbf{Let})\,P = \{p\_1, p\_2, p\_3, \dots, p\_n\}\tag{2}$$

$$\text{Input Matrix} = \left\{ \left( \mathbf{p}\_{i,} \mathbf{q}\_{i} \right) \in \mathbf{P} \times \mathbf{P}, \mathbf{1} \le \mathbf{i} \le \mathbf{n} \right\} \tag{3}$$

Eight measures that exploit WordNet database were used to calculate the semantic similarity between Web service operations. WordNet is a lexical database available online; it is organized into five categories: nouns, verbs, adjectives, adverbs, and function words [9]. The utilization of WordNet for semantic similarity measurements is a good approach in contrast with the traditional syntactic similarity approaches, specifically in the case of service operations, as they normally include a verb indicating the main functionality of the operation method.

Additionally, an application programming interface (API) that implements a large collection of semantic similarity measures (140 methods) is available WNetSSAPI<sup>2</sup> . A deeper analysis and comparison of similarity measures is out of the scope of this work. Table 2 shows a summary of the semantic similarity measures used.

With these measures, all service operations are compared, and a set of eight matrixes are created with the distances between them. Figure 4 shows an example of the calculation of the eight similarities with operation names.

#### Figure 4.

Example of the calculation of semantic similarities.

<sup>2</sup> http://wnetss-api.smr-team.org/
