Sha256: ddba7a27c5f0443e4af6fab93f9d7bbed1dddf424376f29f22df010b8169e439
Contents?: true
Size: 493 Bytes
Versions: 7
Compression:
Stored size: 493 Bytes
Contents
module Dbpedia class SameasExtractor < Wukong::Streamer::LineStreamer include MungingUtils SAME_AS_RE = %r{\A <http://dbpedia\.org/resource/(?<title>[^>]+)> \s <http://www\.w3\.org/2002/07/owl\#sameAs> \s <http://(?<target>[^>]+)> \s \. \z}x def recordize(line) same_as = SAME_AS_RE.match(line) if not same_as then warn_record("Unrecognized line type", line) ; return end [same_as[:title], same_as[:target]] end end end
Version data entries
7 entries across 7 versions & 2 rubygems