Giter VIP home page Giter VIP logo

wikipedia-spark's Introduction

wikipedia-spark

This repo is mainly a wrapper of idio/json-wikipedia, which itself bring some improvement over diegoceccarelli/json-wikipedia.

It combines databricks/spark-xml to read wikipedia dump (without decompressing the whole files :) and the ArticleParser from json-wikipedia to parse wikipedia articles. It brings the speed from Spark and the ability to save easily in parquet or json format, in a distributed maner for instance on S3 :)

build

  1. Build json-wikipedia using the command mvn assembly:assembly (for more information see their readme)

Actually you shoud remove the spark dependency from the pom.xml because it's big and is still at version 1.3 ...

Once the json-wikipedia-1.2.0-jar-with-dependencies.jar is build, put it in a lib folder at the root of this repo.

  1. Build wikipedia-spark using sbt assembly or sbt docker (which also builds you an image ready to go)

usage

docker run --rm asgard/wikipedia-spark:latest spark-submit /home/wikipedia-spark/wikipedia-spark-assembly-0.0.1.jar ...
Usage: SparkWikipediaParser [options]

  --inputPath <value>
        path to xml dump or folder with xml dumps files
  --outputPath <value>
        path to output file / folder
  --outputFormat <value>
        Format for the ouput: parquet or json
  --lang <value>
        language of the dump
  --test
        Flag to test on a few lines

wikipedia-spark's People

Contributors

thomasopsomer avatar

Watchers

 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.