1 year ago

#296625

test-img

Faisal Mirza

How to get the subject and object values from freebase given the relation?

I downloaded the freebase dump to find triples.

I used zgrep to pull a sample of the profession relation (predicate) like this:

zgrep -a '/ns/people.person.profession' -m 20  freebase-rdf-latest.gz

and this is the output:

 <http://rdf.freebase.com/ns/g.119x72pzn>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.05gm1n3>  .
<http://rdf.freebase.com/ns/g.11b60v4ts3>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.02hrh1q>  .
<http://rdf.freebase.com/ns/g.11b6ln58lg>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.0pcq81q>  .
<http://rdf.freebase.com/ns/g.11b7nwjrxk>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.02jknp>   .
<http://rdf.freebase.com/ns/g.11b7nwjrxk>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.0dxtg>    .
<http://rdf.freebase.com/ns/g.11bbxlq56x>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.02hrh1q>  .
<http://rdf.freebase.com/ns/g.11btv848pq>   <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.04gc2>    .
<http://rdf.freebase.com/ns/g.11dykjsvl>    <http://rdf.freebase.com/ns/people.person.profession>   <http://rdf.freebase.com/ns/m.02hrh1q>  .

here its giving me the subject and object as MID's, but I want to get the subject name and object name not the MID's

Example: Will Smith Profession Actor

What command on Ubuntu can I write to achieve this?

nlp

rdf

freebase

information-extraction

knowledge-graph

0 Answers

Your Answer

Accepted video resources