Giter Club home page Giter Club logo

cs-247-datafiles's Introduction

CS 247 DataFiles

Code that was used to preprocess the entirety of english wikipedia to a section-level granular dataset for document reccomendation for the course project of UCLA CS 247 - Advanced Data Mining.

Automated Run:

  1. Ensure the enwiki-latest-pages-articles.xml file is present in the same directory as the run.sh file.
  2. Follow the instructions on the run.sh file and make changes if necessary.
  3. On your terminal, run bash run.sh to complete dataset creation.
  4. Output files and directories:
    1. label2id.json : name implied, a mapping of titles to ids
    2. id2label.json : name implied, a mapping of ids to titles
    3. enc_labs.npz : npz file consisting of the labels ids.
    4. enc_txt.npz : npz file consisting of the tokenized text.
    5. data/ : directory consisting of json files for each article.
    6. index.txt : index of the data/ directory that lets you traverse its contents easily.

How to load data:

Kindly follow instructions in the load_data.py file and use the starter code from there.

Other:

How are the jsons structured??

Here's a schema:

{
    "id" : 123,
    "sections" :[
        {
            "content" : "Section contents (Cleaned)",
            "links" : [ "Page Title Linked", "Page Title Linked" ],
            "title" : "Section Title: Subsection Title"
        }
    ]
    "title" : "Article Title"
}

How to create section-level aggregated data?

Kindly follow the README file in the PlainTextWikipedia folder.

How to tokenize?

Kindly use the encoding.py file with updated filepaths to create tokenized embeddings.

cs-247-datafiles's People

Contributors

om-amitesh avatar

Stargazers

Shaurya Khurana avatar

Watchers

Kostas Georgiou 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.