Skip to main content

Theolex document processing

Project description

[![Python 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://www.python.org/downloads/release/python-380/) [![codecov](https://codecov.io/gh/THEOLEX-IO/legal_doc_processing/branch/master/graph/badge.svg)](https://codecov.io/gh/THEOLEX-IO/legal_doc_processing) [![Build Status](https://travis-ci.org/mtchavez/python-package-boilerplate.png?branch=master)](https://travis-ci.org/mtchavez/python-package-boilerplate) [![Requires.io](https://requires.io/github/mtchavez/python-package-boilerplate/requirements.svg?branch=master)](https://requires.io/github/mtchavez/python-package-boilerplate/requirements?branch=master) [![DeepSource](https://deepsource.io/gh/THEOLEX-IO/legal_doc_processing.svg/?label=active+issues&show_trend=true)](https://deepsource.io/gh/THEOLEX-IO/legal_doc_processing/?ref=repository-badge)

## Requirements

Package requirements are handled using pip. To install them do

` pip install -r requirements.txt `

## Tests

Testing is set up using [pytest](http://pytest.org) and coverage is handled with the pytest-cov plugin.

Run your tests with `pytest` in the root directory.

Coverage is ran by default and is set in the `pytest.ini` file. To see an html output of coverage open `htmlcov/index.html` after running the tests.

## Pipe steps:

Cleaning and feature engineering –> segmentation –> classification –> information extraction

## Usage:

`import legal_doc_processing as ldp`

### in case you have a text : `ld = ldp.LegalDoc(your_text)`

### in case you have a filepath : `ld = ldp.read_file(your_filepath)`

### make a prediction : `case = ld.predict_case()`

`defendant = ld.defendant()`

### make all predictions `preds = ld.predict_all()`

### after a predict “feature” or after predict_all method you can find your predictions as attributes : `case = ld.case`

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

legal_doc_processing-1.0.2.tar.gz (15.6 kB view hashes)

Uploaded Source

Built Distribution

legal_doc_processing-1.0.2-py3-none-any.whl (22.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page