lib/browser_web_data_entity_sumarization/entity_sumarization_predicates_similarity.rb
###
# The method helps to reduce identical predicates by join of common predicate
The method helps to reduce identical predicates by join of common predicate
The method helps to reduce identical predicates by join of common predicate
def reduce_identical
        new_identical = []
        @identical_predicates.each { |key|
          values = PredicatesSimilarity.parse_key(key)
          next if new_identical.find { |v| !(v & values).empty? }
          values = recursive_find_identical(key, values)
          new_identical << values.uniq.sort
        }
        @identical_predicates = new_identical.map { |v| PredicatesSimilarity.get_key(v) }
        store_identical_properties
      end
def reduce_identical new_identical = [ ] @identical_predicates . each { | key | values = PredicatesSimilarity . parse_key ( key ) next if new_identical . find { | v | ! ( v & values ) . empty? } values = recursive_find_identical ( key , values ) new_identical << values . uniq . sort } @identical_predicates = new_identical . map { | v | PredicatesSimilarity . get_key ( v ) } store_identical_properties end
The method helps to reduce identical predicates by join of common predicate
The method helps to reduce identical predicates by join of common predicate
## find nodes with values predicates