Giter Site home page Giter Site logo

johnmunsch / guten-parser Goto Github PK

View Code? Open in Web Editor NEW

This project forked from unsalted/guten-parser

0.0 2.0 0.0 168 MB

Project written to parse Project Gutenberg books to json for injesting in to elasticsearch and other text analysis tools

JavaScript 100.00%

guten-parser's Introduction

Gutenparser

Project written to parse Project Gutenberg books to json for injesting in to elasticsearch and other text analysis tools

This is not production code

This was written explicitly to get the job done - since most of my other code is being written in node.js/javascript it made sense to stay consistent and write the parser in it as well.

As with nearly all node projects CD in to the direcory and run npm install

Folder structure

The directory parser expects two files, in a directory mapped out like this:

├── cache
│   ├── 1
│   │   ├── pg1.rdf
│   │   └── pg1.txt.utf8
│   ├── 2
│   │   ├── pg2.rdf
│   │   └── pg2.txt.utf8
│   ├── 3
│   │   ├── pg2.rdf
│   │   └── pg2.txt.utf8
│   ├── 4
│   │   ├── pg2.rdf
│   │   └── pg2.txt.utf8

The reason for the layout is largely due to the structure of the Guntenberg Project mirror.

I used wget to pull the needed files (and nothing extra) - be wary make sure you use responsibly and check it yourself before executing - this can take several hours.

wget --mirror --no-parent --recursive --force-directories -A "*/" -A "*.txt.utf8" -A "*.rdf" -R "README.txt.utf8" ftp://gutenberg.pglaf.org//mirrors/gutenberg/cache/epub

At the moment there are some errors that come from parsing out the headers There are two log files that keep track of the parsing - files that the text doesn't appear parse on, as well as general word counts.

guten-parser's People

Watchers

 avatar  avatar

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.