pathterminuspages/projects/aboutcontactabout me

Complete Me



Lexical Analysis
Neural Network
@Complete Me

Complete Who

I use Mono Development for writing C#/ASP.NET code. I used to use YouCompleteMe for vim. I almost solely use vim for anything coding (besides of course Mono Development).

Something happened to YouCompleteMe, I don't use it anymore. However I remember it as word based. This is the same as the search engine on the bottom of this page: for an input sequence $s_0$ find a list of words that has $s_0$ as prefix. This search can be done quite fast.

Mono Development has a quite complicated complete me engine. It seems both based on syntax, on word search and even on type theory. It is quite fascinating to look at.

Something Useful

Cnn Parser seems quite useful (something similar probably has been used in coding assistants). It is syntax based. So we will have to do word search after token types have been found. I have devised as a showcase. An example run is found in examples/complete_me1.txt. By default the program is started with 10 #include statements to overcome the huge amount of those found in top of every C program. It seems that the program can diverge from one line functions. For example if I write int right after an opening curly brace in a function, it suggests @ident and then on till semicolon and finally closing brace. I think the LSTM (Long Short Term Memory) plays a role here. The predictions are probably based on local context and global.

In all it seems quite dynamic: if you are not satisfied and want to go down another road, just write it and it will try to predict that road. Of course by hacking a table driven parser generator we would have only syntactically correct suggestions. However we would have all of them, then we would have to figure which ones are the most appropriate. With Cnn Parser we have statistical suggestions: the most likely suggestions. Besides that a nn can learn functions. So there should be a good chance that Cnn Parser can become quite correct. On the downside it does not know all next tokens. So if you go down a path of a syntax error, Cnn Parser will probably become quite weird.

CommentsGuest Name:Comment: