GithubHelp home page GithubHelp logo

chengli0327 / attribute_charge Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thunlp/attribute_charge

0.0 1.0 0.0 17 KB

The source code of our COLING'18 paper "Few-Shot Charge Prediction with Discriminative Legal Attributes".

Python 100.00%

attribute_charge's Introduction

Few-Shot Charge Prediction with Discriminative Legal Attributes

Source code and datasets of COLING2018 paper: "Few-Shot Charge Prediction with Discriminative Legal Attributes". (pdf)

Dataset

Please download the dataset here, unzip it and you will get three folders: "data", "data_20w", "data_38w". Then put the folder "data" under this directory. It contains following files:

  • words.vec: Pre-trained word embeddings, each line contains a word and its embedding.
  • attributes: The legal attributes for each charge.
  • train: data for training from small dataset.
  • test: data for test from small dataset.
  • valid: data for validation from small dataset.

If you want to train and test on middle dataset, please copy the files in "data_20w" folder to "data" folder. If you want to train and test on large dataset, please copy the files in "data_38w" folder to "data" folder.

Run

Run the following command for training our model:

cd code/
python train.py

Dependencies

  • Tensorflow == 0.12
  • Scipy == 0.18.1
  • Numpy == 1.11.2
  • Python == 2.7

Log

After start training, a new folder "log" will be created.There are 4 directories in it:

  • /evaluation_charge_log/: stores model's performance of charge prediction on test data during training.
  • /evaluation_attr_log/: stores model's performance of attribute prediction on test data during training.
  • /validation_charge_log/: stores model's performance of charge prediction on validation data during training.
  • /validation_attr_log/: stores model's performance of attribute prediction on validation data during training.

Cite

If you use the code, please cite this paper:

Zikun Hu, Xiang Li, Cunchao Tu, Zhiyuan Liu, Maosong Sun. Few-Shot Charge Prediction with Discriminative Legal Attributes. The 27th Iinternational Conference on Computational Liguisitics (COLING 2018).

For more related works, please refer to my homepage.

attribute_charge's People

Contributors

zig-kwin-hu 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.