Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8036027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:28:59+00:00 2026-06-05T02:28:59+00:00

I am trying to use the freebase data dump, but it seams that I

  • 0

I am trying to use the freebase data dump, but it seams that I have some problems reading the files with python. It looks like that my program cant read all the lines.

def test2():
    count=0
    for line in open(FREEBASE_TOPIC):
        count+=1
    return count

def test3():
    count=0
    for line in open(FREEBASE_QUAD):
        count+=1
    return count


if __name__ == "__main__":

   print "FREEBASE TOPIC - NR LINES:",test2()
   print "FREEBASE QUAD - NR LINES:",test3()

Results in this:

FREEBASE TOPIC - ITR TIME: 1.21000003815
FREEBASE TOPIC - NR LINES: 1643010

FREEBASE QUAD - ITER TIME: 0.797000169754
FREEBASE QUAD - NR LINES: 3155131

This can be all. It looks to be to few lines to contain the whole freebase. And I cant see how it is possible to iterate over one 33GB file and another 5GB file in 2 seconds.

What is wrong? I am downloading the files again in case something went wrong during the download process, but it takes decades with my connections, so I am asking ere in the mean time. The file size is correct, and i have printed some of the lines and they look correct.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T02:29:00+00:00Added an answer on June 5, 2026 at 2:29 am

    there is a problem that occurred to me:

    open('file', 'rb')
    

    should solve it.

    chr(26)
    

    sometimes causes an file ending for text mode ‘r’ that is default.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying use Thread but i have some problem (I am beginner at
I'm trying use eco for client-side templating. I have multiple .eco templates that I'd
I'm trying to retrieve the full topic description/summary for some Freebase articles. I have
I have a regex that I'm trying use to validate against strings. Trying to
I have a 3rd party DLL that I am trying to use in a
I'm trying use epoch time dates in my series data. The array looks like
Im trying use a Java annotation in a Groovy class but have trouble to
Hi I'm trying use a datepicker on a field I have. I'm trying to
Trying to use GnuPG with Delphi (Win32). I need to sign some file with
I am trying use javascript regular expressions to do some matching and I found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.