{"id":512,"date":"2020-05-15T08:00:51","date_gmt":"2020-05-15T08:00:51","guid":{"rendered":"https:\/\/metrics.blogg.gu.se\/?p=512"},"modified":"2020-05-02T08:29:42","modified_gmt":"2020-05-02T08:29:42","slug":"machine-learning-for-source-code-suggestion-completion","status":"publish","type":"post","link":"https:\/\/metrics.blogg.gu.se\/?p=512","title":{"rendered":"Machine learning for source code suggestion, completion"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-1024x683.jpg\" alt=\"\" class=\"wp-image-513\" srcset=\"https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-1024x683.jpg 1024w, https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-300x200.jpg 300w, https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-768x512.jpg 768w, https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-1200x800.jpg 1200w, https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920-1320x880.jpg 1320w, https:\/\/metrics.blogg.gu.se\/files\/2020\/05\/computer-2583383_1920.jpg 1920w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 1362px) 62vw, 840px\" \/><figcaption>Image by <a href=\"https:\/\/pixabay.com\/users\/StockSnap-894430\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2583383\">StockSnap<\/a> from <a href=\"https:\/\/pixabay.com\/?utm_source=link-attribution&amp;utm_medium=referral&amp;utm_campaign=image&amp;utm_content=2583383\">Pixabay<\/a><\/figcaption><\/figure>\n\n\n\n<p><a href=\"https:\/\/www-sciencedirect-com.ezproxy.ub.gu.se\/science\/article\/pii\/S0950584920300616\">https:\/\/www-sciencedirect-com.ezproxy.ub.gu.se\/science\/article\/pii\/S0950584920300616<\/a><\/p>\n\n\n\n<p>This is a great paper demonstrating the use of NLP techniques for completion of software source code. It uses recurrent networks and can reduce the size of the vocabulary compared to previous approaches. \n<\/p>\n\n\n\n<p>As the authors say: \u201cThe CodeGRU introduces a novel approach which can correctly capture the source code context by leveraging the token type information.\u201d \n<\/p>\n\n\n\n<p>I like the approach because it can extract the information that is important for the analysis of source code &#8211; what kind of token is analysed and how it is used. \n<\/p>\n\n\n\n<p>Conclusions (quote from the abstract): \u201cOur experiment confirms that the source code\u2019s contextual information can be vital and can help improve the software language models. The extensive evaluation of CodeGRU shows that it outperforms the state-of-the-art models. The results further suggest that the proposed approach can help reduce the vocabulary size and is of practical use for software developers.\u201d\n<\/p>\n\n\n\n<p>I\u2019m kind of keen to check this approach in our work. See if we can use this to improve the quality of source code. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>https:\/\/www-sciencedirect-com.ezproxy.ub.gu.se\/science\/article\/pii\/S0950584920300616 This is a great paper demonstrating the use of NLP techniques for completion of software source code. It uses recurrent networks and can reduce the size of the vocabulary compared to previous approaches. As the authors say: \u201cThe CodeGRU introduces a novel approach which can correctly capture the source code context by leveraging the &hellip; <a href=\"https:\/\/metrics.blogg.gu.se\/?p=512\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Machine learning for source code suggestion, completion&#8221;<\/span><\/a><\/p>\n","protected":false},"author":68,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,7,4],"tags":[],"_links":{"self":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/512"}],"collection":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/users\/68"}],"replies":[{"embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=512"}],"version-history":[{"count":1,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/512\/revisions"}],"predecessor-version":[{"id":514,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=\/wp\/v2\/posts\/512\/revisions\/514"}],"wp:attachment":[{"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/metrics.blogg.gu.se\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}