Giter VIP home page Giter VIP logo

cda-cs's Introduction

CDA-CS

1. Environment Setup

Python library dependencies:

  • torch>=1.0.1
  • scipy>=0.14.0
  • numpy -v: 1.19.1
  • gensim -v: 3.8.1
  • NLTK -v: 3.5
  • sklearn -v: 1.19.0

2. Original Data

Dataset: Wasi Uddin Ahmad, Saikat Chakraborty, Baishakhi Ray, and Kai-Wei Chang. A transformer-based approach for source code summarization. ACL 2020, Online, July 5-10, 2020, pages 4998โ€“5007. Association for Computational Linguistics, 2020.

3. Clustering

  • tf_idf_vec.py

    python tf_idf_vec.py 

You can get the TF_IDF vetor of input file, please place this input file into the data folder, and run:

  • K-means.py

    python K-means.py 

In this way, the data that needs to be data augmentation can be obtained.

4. Data Augmentation

  • eda_uad_bert_augment.py

  • eda_uda_bert.py

    python eda_uad_bert_augment.py --input=train.txt --output=augmented.txt --num_aug=20

You can specify your own with --output. You can also specify the number of generated augmented sentences per original sentence using --num_aug.

5. New Dataset

  • split.py

    python split.py
    

You need to split augmented.txt into javadoc.original and code.original_subtoken.

cda-cs's People

Contributors

zxxsong 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.