# Towards a Semantics-Based Recommendation System for Cultural Heritage Collections
## 3 Developing a Recommendation System for Cultural Heritage Collections
### System Architecture and Recommendation Algorithms
The Search Module generates search results based on the weighted Degree Centrality of objects (described in step 2.3), which is affected by three factors: the centrality score of subjects/keywords (see step 1.4); the additional weight assigned to relationships after the user selects subjects/keywords; and the centrality score of objects. We want the system to prioritise the user's selection of subjects or keywords over the centrality scores of objects. In this way, an object that is associated with all the subjects/keywords the user selects will appear higher than any object that may be connected to many more subjects/keywords in total but to only some of the ones that the user selected. Assigning the maximum number of subjects/keywords that an object can be associated with as an additional weight in the relationships connecting objects to the selected subjects/keywords achieves our purpose. The following Cypher statement retrieves the maximum number of subjects/keywords an object can be associated with, assigns it to the node viewed property of the Topic nodes that represent the subjects/keywords selected by the user, and updates (as described above) the relationship weight. The reason for assigning this value to the viewed property is that we want to use it as a base score for the selected Topic nodes. The value of the viewed property of each Topic node will then be incremented every time the user views an object associated with this node. Figure 6: Topics with top centrality values and their centrality scores. Screenshot from Neo4j. The topics listed in the figure are: 1. Photographic portrait, 2. Group portrait, 3. Still life, 4. Natural scenery, 5. Japanese people, 6. Household goods, 7. Buildings and installations, 8. Japanese painting. 2. Graph projection for object centrality computation  
In order to use the updated relationship weights to compute the centrality of object nodes, we created a new graph projection. The new projection is similar to the previous one but excludes the T3 nodes as the user requested, so any object related to T3 will not be included in the search results. CALL gds.graph.project.cypher( 'projection', 'MATCH (n) WHERE n:AscdcProvidedCHO OR n:Topic AND NOT n.uri = \"T3\"  RETURN id(n) AS id', 'MATCH (n:AscdcProvidedCHO)-[r:subject!keywords]->(m:Topic) RETURN id(n) AS source, id(m) AS target, r.weight AS weight', {validateRelationships: false})  
Centrality of object: weighted Degree Centrality  
The Search Module presents the search results ranked by the weighted Degree Centrality of the objects, which depends on the weights of the relationships of each object and the centrality of the object nodes. Like step 1.3, the Page Rank, Article Rank, Eigenvector Centrality, and Degree Centrality algorithms were considered for computing centrality. We selected Degree Centrality as it is the only algorithm among the four that considers both incoming and outgoing relationships. As shown in steps 1.2 and 2.2, subject/keywords relationships point from AscdcProvidedCHO (object) to Topic nodes. The other three algorithms compute the centrality of nodes based only on the incoming relationships; therefore, they would not be able to compute the centrality of object nodes taking into account their subject/keywords relationships. Another reason for choosing Degree Centrality is that it is the most sensitive to the relationship weight among all these algorithms. Experiments conducted using all four algorithms show that the number of relationships contributes much more than the relationship weight to the centrality score of each object in the other three algorithms. In our system, this would mean that an object associated with a small number of subjects/keywords will never appear at the top of the list of results, even if these subjects/keywords are exactly the ones selected by the user. The following Cypher statement computes the weighted Degree Centrality of object nodes.