Ongoing research on neural code completion - src-d/code-completion
10K+
[https://github.com/src-d/code-completion] - source{d}'s efforts to implement a smarter coding assistant. This time, it only supports Go code and is command-line. Usage:
# current query
cat tokenizer/tokenizer.go | docker run -i --rm srcd/code-completion tokenizer_linux -pos -10
>>> ["func", ID_S, "(", "err", ID_S, ")", "{", ID_S, ".", ID_S, "(", ID_LIT_STR]
# full function
cat tokenizer/tokenizer.go | docker run -i --rm srcd/code-completion tokenizer_linux -pos -10
>>> ["func", ID_S, "(", "err", ID_S, ")", "{", ID_S, ".", ID_S, "(", ID_LIT_STR, ",", "err", ")", ";", "}"]
Id inference should not be demonstrated so far.
Change "pos" to arbitrary values to get into different places in the code.
# prediction
cat tokenizer/tokenizer.go | docker run -i --rm srcd/code-completion tokenizer_linux -pos -10 | docker run -i --rm srcd/code-completion infer_toks.py --model /maximo_toks_0.81.hdf --number 5
>>> ','@1.000 ')'@0.206 '+'@0.001 'nil'@0.000 '*'@0.000
We predicted the comma "," Ta-da!
Content type
Image
Digest
Size
233.1 MB
Last updated
about 9 years ago
docker pull srcd/code-completion