Giter Club home page Giter Club logo

erisk2018parser's Introduction

erisk2018data

Contains the handler module, which parses the data for a given task
E.g.

from erisk2018data.handler import Task, batchify
task_one = Task('path/to/task1')
training_chunks, test_chunks = task_one.get_split('a')
chunk = training_chunks[0]
length_of_chunk = len(chunk) 
chunk_as_list = list(chunk)
chunk_in_batches = batchify(chunk, batch_size=64)

Install from GitHub

pip install git+https://github.com/BigMiners/eRisk2018/eRisk-2018-parser.git

Building the package

source myvirtualenv/bin/activate
cd navigate/to/erisk-2018-parser
pip install .

Classes

Task

Static methods

__init__(self, path, reader=None)  
    Initialize self.  See help(type(self)) for accurate signature.
    
text_only_xml(path)
    Retrieves the text (titles and content) from a user's writings at a given chunk. Pass this function
    as a parameter to __init__
    :param path: path to xml file
    :return: concatenated titles (from empty posts) and contents

verbatim_xml(path)
    Retrieves the xml from a user's writings at a given chunk. Pass this function
    as a parameter to __init__
    :param path: path to xml file
    :return: xml contents as a string

with_dates_xml(path)
    Retrieves the text (titles and content) and dates from a user's writings at a given chunk. Pass this function
    as a parameter to __init__
    :param path: path to xml file
    :return: concatenated dates, titles (from empty posts) and contents

Instance methods

get_split(self, name)
    Gives a list of 10 generators (1 per chunk) for a given split
    :param name: name of the split
    :return: list of train chunks, list of test chunks

erisk2018parser's People

Stargazers

JwongXyan Myou avatar

Watchers

James Cloos avatar  avatar JwongXyan Myou avatar

Forkers

gowthammk

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.