All Projects → code-gen → cscg

code-gen / cscg

Licence: MIT license
Code Generation as a Dual Task of Code Summarization.

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to cscg

EasyEE-Auto
EasyEE 自动化代码生成器。EasyEE Automated code generator.
Stars: ✭ 39 (+39.29%)
Mutual labels:  code-generation
LM-CNLC
Chinese Natural Language Correction via Language Model
Stars: ✭ 15 (-46.43%)
Mutual labels:  language-model
fling
A fluent API generator
Stars: ✭ 20 (-28.57%)
Mutual labels:  code-generation
Sweet.apex
Next Generation of Apex Development
Stars: ✭ 43 (+53.57%)
Mutual labels:  code-generation
tiles
Programmatic code generation
Stars: ✭ 78 (+178.57%)
Mutual labels:  code-generation
Beef
Business Entity Execution Framework
Stars: ✭ 95 (+239.29%)
Mutual labels:  code-generation
gamma
An Eclipse-based modeling framework for the component-based design and analysis of reactive systems
Stars: ✭ 21 (-25%)
Mutual labels:  code-generation
designto-code
Design to code engine. A design ✌️ code standard. Supports React, Flutter and more.
Stars: ✭ 87 (+210.71%)
Mutual labels:  code-generation
gdc
Code for the ICLR 2021 paper "A Distributional Approach to Controlled Text Generation"
Stars: ✭ 94 (+235.71%)
Mutual labels:  language-model
FSharpWrap
Utility that automatically generates F# modules and functions based on your F# project file's references
Stars: ✭ 14 (-50%)
Mutual labels:  code-generation
kobby
Kobby is a codegen plugin of Kotlin DSL Client by GraphQL schema. The generated DSL supports execution of complex GraphQL queries, mutation and subscriptions in Kotlin with syntax similar to native GraphQL syntax.
Stars: ✭ 52 (+85.71%)
Mutual labels:  code-generation
query completion
Personalized Query Completion
Stars: ✭ 24 (-14.29%)
Mutual labels:  language-model
AUXify
Introduces macro/meta annotations @ aux, @ self, @ instance, @ apply, @ delegated, @ syntax and String-based type class LabelledGeneric
Stars: ✭ 25 (-10.71%)
Mutual labels:  code-generation
qp-arduino
QP real-time embedded frameworks/RTOS for Arduino (AVR and SAM)
Stars: ✭ 37 (+32.14%)
Mutual labels:  code-generation
typed-astunparse
Python 3 AST unparser with type comments support.
Stars: ✭ 27 (-3.57%)
Mutual labels:  code-generation
minGPT-TF
A minimal TF2 re-implementation of the OpenAI GPT training
Stars: ✭ 36 (+28.57%)
Mutual labels:  language-model
nmodl
Code Generation Framework For NEURON MODeling Language
Stars: ✭ 42 (+50%)
Mutual labels:  code-generation
CoLAKE
COLING'2020: CoLAKE: Contextualized Language and Knowledge Embedding
Stars: ✭ 86 (+207.14%)
Mutual labels:  language-model
gpt-j-api
API for the GPT-J language model 🦜. Including a FastAPI backend and a streamlit frontend
Stars: ✭ 248 (+785.71%)
Mutual labels:  language-model
toast
Plugin-driven CLI utility for code generation using Go source as IDL
Stars: ✭ 52 (+85.71%)
Mutual labels:  code-generation

Code Generation as a Dual Task of Code Summarization

render Code style: black

Ad-hoc implementation of the CS/CG model proposed by Wei et al.

Getting started

  • Each dataset must be defined as a sub-class of torch.utils.data.Dataset, with methods for
    • preprocessing and vocab builder (text -> vocab look-up indices)
    • __getitem__ which must return a training example
    • __len__
    • generating train/test/valid splits
    • computing language model probabilites (i.e. P(x), where x: anno/code tensor)

Computing LM probabilities

  • Get train/test/valid splits for a dataset.
  • Construct a configuration for the LM.
  • For each kind (anno/code), train a LM and dump the model as lm-{dataset_name}-{kind}.pt (e.g. lm-django-anno.pt).
  • Finally, using these models, compute P(x) for each x (anno/code tensor).

Reference

@article{wei2019code,
  title={Code Generation as a Dual Task of Code Summarization},
  author={Wei, Bolin and Li, Ge and Xia, Xin and Fu, Zhiyi and Jin, Zhi},
  journal={arXiv preprint arXiv:1910.05923},
  year={2019}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].