lib/browser_web_data_entity_sumarization/entity_sumarization_predicates_similarity.rb
###
# The method helps to collect identical chains.
#
# @param [Array<String>] keys Array of identical key items.
# @param [Array<String>] values All values that is related to all keys.
#
# @return [Array<String>] all_find_values
The method helps to collect identical chains.
The method helps to collect identical chains .
def recursive_find_identical(keys, values)
        keys = [keys] unless keys.is_a?(Array)
        @identical_predicates.each { |this_key|
          next if keys.include?(this_key)
          temp = PredicatesSimilarity.parse_key(this_key)
          unless (temp & values).empty?
            keys << this_key
            return recursive_find_identical(keys, (values + temp).uniq)
          end
        }
        values
      end
def recursive_find_identical ( keys , values ) keys = [ keys ] unless keys . is_a? ( Array ) @identical_predicates . each { | this_key | next if keys . include? ( this_key ) temp = PredicatesSimilarity . parse_key ( this_key ) unless ( temp & values ) . empty? keys << this_key return recursive_find_identical ( keys , ( values + temp ) . uniq ) end } values end
The method helps to collect identical chains.
The method helps to collect identical chains .
None
Array<String>
keys
<not_specific>
values
<not_specific>
<not_specific>
values All values that is related to all keys.
values All values that is related to all keys .