GithubHelp home page GithubHelp logo

ss-abl's Introduction

Semi-Supervised Abductive Learning for Theft Judicial Sentencing

This is the repository for holding the sample code of the Semi-Supervised Abductive Learning framework for Theft Judicial Sentencing experiments in Semi-Supervised Abductive Learning and Its Application to Theft Judicial Sentencing in ICDM 2020.

This code is only tested in Linux environment.

Dependency

  • Python 3.6

  • tensorflow 1.12.0

Running Code

Set Data File Path

# Before running code, we should set data file path first.
# By default, all data files are in "./data/"

# Data file path's setting codes are lies on line 207 - 212 in "ss_abl_model.py".
# Bert Pretrain json file name
pretrain_filename = "0_0.10.json"

# Sentence model supervised traning data file path
pretrain_money_filename = "./data/0_0.10.csv" 

# Unlabeled data file name
abl_train_filename = "1_0.90.json"
abl_train_money_filename = "1_0.90.csv"

# Bert test data file name
test_filename = "10.json"
# Sentence model test data file name
test_money_filename = "10.csv"
unzip data/dataset.zip
wget https://storage.googleapis.com/bert_models/2018_11_03/chinese_L-12_H-768_A-12.zip
unzip chinese_L-12_H-768_A-12.zip
python ss_abl_model.py

Parameters

Our model's parameters are listed below.

# Model's Parameter and default value
abl_max_change_num = 2 # The max number of label could be changed on abduction

abl_times = 1 # The model traning iteration number
rule_file_path = "rule_test_file.txt" # abduction rule file path

pretrain_bert_train_epochs = 16 # The epoch number of BERT training on Supervised data
pretrain_sentence_model_times = 3 # The epoch number of sentence model traning on Supervised data
abl_bert_train_epochs = 1 # The epoch number per iteration of BERT traning on abduction process
abl_sentence_model_times = 3 # The epoch number per iteration of sentence model traning on abduction process

ss-abl's People

Contributors

zhoufangquan avatar

Watchers

 avatar

Forkers

zyjjjjjjj

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.