0

I downloaded the Freebase Easy dataset (3.3GB). I want to investigate this dataset in typing some entities. e.g: German (types in freebase: location, country, land.....). enter image description here

How can I CONCATENATE these three files to have full dataset?

Tom Morris
  • 10,490
  • 32
  • 53
n.roqaya
  • 19
  • 5
  • Where did you download from? Those filenames don't look familiar as part of the original Freebase data dump from Google. Also, text would be much more useful than an image since it's searchable, can be cut/paste, etc. – Tom Morris Apr 21 '20 at 19:55
  • I downloaded the file from this link: http://freebase-easy.cs.uni-freiburg.de/dump/ – n.roqaya Apr 22 '20 at 11:10

1 Answers1

0

The files (facts.txt freebase-links.txt scores.txt) are all in the same format, so they can be simply concatenated. On a Unix-like system, you could use the command:

cat facts.txt freebase-links.txt scores.txt > all.txt

or you could keep everything compressed by doing something like

unzip -ca freebase-easy-latest.zip \*.txt | gzip > freebase-easy-all.txt.gz

an example entry would look like

$ unzip -ca freebase-easy-latest.zip \*.txt | grep $"^B\t" 
B   prominence-score    1758.0  .
B   freebase-entity <http://rdf.freebase.com/ns/m.0560cf>   .
B   Transit System  New York City Subway    .
B   is-a    Topic   .
B   is-a    Transit Line    .
B   kg/object_profile/prominent_type    Transit Line    .

where the first line is from scores.txt, the second line from freebase-links.txt, and the remainder from facts.txt.

Tom Morris
  • 10,490
  • 32
  • 53