## 3 A Recommender of Tourist Activities Based on Clustering and Rule Mining
### Data Collection and Pre-Processing
#### 3.2.3 Activity Identification  
In order to capture the preferences of users, it is necessary to analyse their tweets to determine the POIs and types of activities that they have taken part in. The term _point of interest (POI)_ has appeared in many tourism-related articles, and was used as early as the 1930s. It usually refers to a place a tourist is expected to see or visit, also known as a \"sight\" [47; 48]. These POIs may be defined by verified administrative bodies or from user interactions and trajectories. [PERSON] et al. considered all these sources, including user interactions by incorporating POIs determined from photos taken by users [49]. It is also possible to predict POIs based on a user's trajectory and proximity, as proposed by [PERSON] et al. [50]. Twitter does not provide information on the POIs visitedby users, so it has to be inferred from the available data. In this work the POIs and types of activities were determined from Open Street Map and represented in a hierarchical structure. This approach is an extension of the method proposed by [PERSON] et al. ([25]), but in this work we have considered more activity categories and we have added text analysis to the identification process. The following services have been used in the identification process:  
* _Open Street Map (OSM)_[51]: It is an open-source map server which includes cartographic documentation of roads, streets, water bodies, buildings, etc. It also provides geocoding and geoparsing services. As it is open source, it has become the first choice for academic research. In the OSM database, physical features (buildings, roads, etc.) are represented by tags, which describe the geographic attributes of those features [52]. These tags provide information about an element, such as its \"name\" and \"purpose\". For example, the tag _nature_ : _beach_ is used to identify a beach. We have used these tags to create a tree structure to categorise activities experienced by tourists. A fully comprehensive list of tags and their descriptions can be found at OSM taginfo [52; 53]. It is important to note that tags may change overtime or be discontinued and replaced by OSM. The activity tree has a root node named \"_Activities_\". Its children are the main categories, which were inspired by an ontology we developed in previous work ([54]): Routes, Sports, Gastronomy, Leisure, Accommodation, Transportation, Nature and Culture. The tree also includes numerous subcategories that are descendants of the main categories. The leaves of the tree correspond to the OSM tags. Figure 2 shows a sample section of the activity tree. The complete tree consists of 32 subcategories and a total of 175 OSM tags in the leaves. The complete tree is detailed in Appendix A. * _Overpass turbo_[55]: It is a query server for requesting specific features in the OSM database. Overpass provides a query language (Overpass QL [56]), similar to Structured Query Language (SQL), to help users gain access to specific information in the OSM database. For example, physical features within a certain radius from a \([Latitude,Longitude]\) coordinate pair can be requested and filtered by their OSM tags. We used the Overpass query language to request all POIs within a certain range around the coordinates of a touristic tweet. These POIs were OSM map features categorised as _Nodes, Ways, Relations_ or _Areas_. _Nodes_ are single structures, such as office buildings, which include coordinates to represent their locations. _Ways_ consist of several nodes with individual coordinates, which represent structures such as roads, highways,  
Figure 2: Sample chunk of the Activity tree, showing the main category “_Gastronomy_”, its subcategories “_Food_” and “_Entourism_” and the OSM tags associated with them. streets, pathways, plaza, fountains, parks and steps. _Relations_ are compound structures which include several nodes and ways. For example, complex attractions comprising multiple buildings such as Sagrada Familia are relations.