## 4 Use Case Evaluation
### Ontology Alignment  
The S2 NeTM is designed to facilitate communication between heterogeneous IoT devices that use different ontologies to represent their data. One important aspect of this middleware is the ontology alignment method used to identify _co-semantic_ relationships between entities from different ontologies. In this section, the ontology alignment method used in the context of the Green Route scenario is described.  
For a pollution-free walking route suggestion, multiple entities collaborate to provide Maria with the necessary data. Two of these entities, _IoTEntity1_ and _IoTEntity2_, have the potential to work together as sensors to provide real-time environmental and traffic information, despite using different ontologies to represent their data. _IoTEntity1_ measures air quality and other environmental parameters, using the _S2 NeTM ontology_. Meanwhile, _IoTEntity2_ is mounted on a lamp post and provides real-time traffic information that can affect the level of pollution on the route, using the _SSOR ontology_[29]. By utilizing the ontology alignment, the S2 NeTM enables these two sensors to exchange data with each other.  
In particular, S2 NeTM facilitates the communication between the two entities by applying the general ontology alignment process outlined in the following steps.  
1. _Input ontologies identification_: The alignment method identifies the appropriate ontology for each sensor device. In this case, one sensor uses the _S2 NeTM ontology_, while the other sensor uses the _SSOR ontology_.
2. _Entity identification_: The alignment method identifies the relevant entities in each ontology that represent the data from the sensors. For example, the \"Location\" entity in the _S2 NeTM ontology_ represents the data in the one sensor, while the \"GeoLocation\" entity in the _SSOR ontology_ represents the other sensor's data.
3. _Entity matching_: The alignment method matches the entities from different ontologies that have similar semantics. For instance, the \"Entity\" class from the _S2 NeTM ontology_ matches the \"Object\" class from the _SSOR ontology_.
4. _Similarity calculation_: The alignment method calculates the similarity between the matched entities, using various similarity measures such as structural, lexical, and semantic similarity. The combined similarity score is calculated by taking the average of the individual similarity scores. Table 3 gives an example of the similarity calculation between different entities from the _S2 NeTM_ and _SSOR_ ontologies.
5. _Co-semantics relationship_: If the combined similarity score between two entities reaches or exceeds the predefined threshold of 0.8, the S2 NeTM approves the co-semantics relationship between the entities. In this example, the overall combinedsimilarity score is 0.84; therefore, _IoTEntity1_ is considered to have a _co-semantics_ relationship with _IoTEntity2_. Once the _co-semantics_ relationship has been established, the S2 NeTM maps the data from each sensor to the common ontology that both sensors understand, allowing them to exchange data with each other, despite using different ontologies to represent their data.