Giter Site home page Giter Site logo

precos's Introduction

Precos: Project-specific Retrieval for Better Code Summarization

dependencies

Please refer to knn-transformers. Additionally, you should install pylucene for subset retrieval.

subset retrieval

cd to subset_retrieval, set LANG, TEST_PROJECT, KEY, and directory in syntax_subset_retrieval.sh and semantics_subset_retrieval.sh, then run them to perform sentence-level retrieval in history-based corpus construction. The output is a file containing the ids in CSN train set. Merge the four files to get the union of all-type retrieved ids. And then construct the ext-subset from CSN and ids.

datastore creation

First combine the retrieved ext-subset with project train set. Then set the arguments in datastore_creation.sh and run bash datastore_creation.sh to create datastore.

generation

locality index file

First separately perform datastore creation for ext-subset and project train set. You can get dstore_size.txt in dstore_dir. Then run python get_locality_index.py to get the locality index file.

generate summaries

Set the arguments in generation.sh and run bash generation.sh to generate summaries.

acknowledgement

The implementation is based on knn-transformers.

precos's People

Contributors

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