Code Monkey home page Code Monkey logo

gutenberg-dialog's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gutenberg-dialog's Issues

Note in readme about using alternate Gutenberg mirrors

Hi @ricsinaruto! I absolutely love this project and the idea of extracting dialog datasets from books.

I wanted to share a small issue I ran into when running the pipeline. By default, the gutenberg package attempts to use the mirror http://aleph.gutenberg.org for downloading the books, when gutenberg.acquire.load_etext(...) is called from download.py. For some reason this mirror was down, and I got the message "Could not download book" for every book in the list.

A little digging revealed that the gutenberg library allows an alternate mirror to be specified as an environment variable - you can specify any mirror URL from https://www.gutenberg.org/MIRRORS.ALL and set it to the env. variable GUTENBERG_MIRROR before running the code. For example,

export GUTENBERG_MIRROR="https://gutenberg.pglaf.org"
python code/main.py ...

I thought it might be helpful to mention this somewhere in the readme to save others from scratching their head on this! What do you think? I can submit a PR for it if that is ok.

Best regards and thanks again for this amazing work!

ZeroDivisionError: division by zero

I'm just dumping this here so I don't forget really - not pushing for a fix. Im totally grateful for your work :)

...
Filtering old books based on vocab for nl language.
Filtered 0 books.
Filtering old books based on vocab for es language.
Filtered 0 books.
Filtering old books based on vocab for pt language.
Filtered 0 books.
Filtering old books based on vocab for it language.
Filtered 0 books.
Filtering old books based on vocab for hu language.
Filtered 0 books.
Extracting dialogs for en language.
Traceback (most recent call last):
  File "C:\Training\training\training\gutenberg-dialog\code\main.py", line 77, in <module>
    main()
  File "C:\Training\training\training\gutenberg-dialog\code\main.py", line 73, in main
    p.run()
  File "C:\Training\training\training\gutenberg-dialog\code\pipeline\pipeline.py", line 30, in run
    extract(self.config)
  File "C:\Training\training\training\gutenberg-dialog\code\pipeline\dialog_extractor.py", line 79, in extract
    dialogs, file_stats = extract_(cfg, directory, lang)
  File "C:\Training\training\training\gutenberg-dialog\code\pipeline\dialog_extractor.py", line 49, in extract_
    if num_chars / num_words * 10000 > cfg.min_delimiters:
ZeroDivisionError: division by zero

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.