Giter Club home page Giter Club logo

Comments (2)

orgtre avatar orgtre commented on September 24, 2024

Glad you find it useful. When this error occurs one has to increase the per_file_number_of_most_freq variable in the settings section of gather_and_clean.py until it stops appearing.

In addition to min_freq_to_keep in download_and_extract_most_freq.py it further controls how many entries to keep from each Google source file, and is there to reduce the runtime and memory used by the more demanding cleanup code (in my experience these would be too high if all entries are always kept).

In your case, try changing the value for "spanish" from {1: 25000, 2: 5000, 3: 3000, 4: 3000, 5: 5000} to {1: 50000, 2: 5000, 3: 3000, 4: 3000, 5: 5000} for example. You need to set the first value high enough (by trail and error).

from google-books-ngram-frequency.

vicmarcag avatar vicmarcag commented on September 24, 2024

Thank you for the response! I have successfully extracted 1grams for english, but I keep getting the same error while extracting 1gram for spanish...

This is my configuration for download_and_extract_most_freq.py:

ns = [1]
langs = ["spanish"]
year_start = 2010
year_end = 2023
min_freq_to_keep = {1: 50, 2: 1000, 3: 1000, 4: 1000, 5: 1000}

This is the configuration for gather_and_clean.py:

ns = [1]
langs = ["spanish"]
year_start = 2010
year_end = 2023
number_of_most_freq -> {1: 100000, 2: 5000, 3:3000, 4:1000, 5:1000}
per_file_number_of_most_freq ->  {1: 100000, 2: 5000, 3:3000, 4:1000, 5:1000}

I have increased the per_file_number_of_most_freq until it reaches 100000, but I keep getting the same error:

image

Thank you in advance!

from google-books-ngram-frequency.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.