def _compute_cultural_score_building(building_geometry, historical_elements_gdf, historical_elements_gdf_sindex, score = None):

    """
    Compute pragmatic for a single building. It supports the function "pragmatic_meaning" 
     
    Parameters
    ----------
    buildings_geometry: Polygon
    building_land_use: string
    historical_elements_gdf_sindex: Rtree spatial index
    score: string
   
    Returns
    -------
    float
    """

    possible_matches_index = list(historical_elements_gdf_sindex.intersection(building_geometry.bounds)) # looking for possible candidates in the external GDF
    possible_matches = historical_elements_gdf.iloc[possible_matches_index]
    pm = possible_matches[possible_matches.intersects(building_geometry)]

    if (score is None):
        cs = len(pm) # score only based on number of intersecting elements
    elif len(pm) == 0: 
        cs = 0
    else: cs = pm[score].sum() # otherwise sum the scores of the intersecting elements
    
    return cs