Community
Participate
Working Groups
The subwords completion engine uses the internal ranking of Eclipse JDT yet. However, when using subwords or regular expressions a smarter ranking strategy is needed. For instance, proposals that match the prefix entered by the user should be ranked higher in the list than those that match the simple regular expression. And completions that contain several characters in row (which we call subwords) as in 'foc' which matches 'setFocus' quite well, should be ranked higher that proposals that just match the characters. A first guess how to implement this is to use the Jaro-Winkler string distance measure and rank the proposals accordingly to this score. Details on this string distance measure can be found here: http://en.wikipedia.org/wiki/Jaro–Winkler_distance The code relevant to this feature is in org.eclipse.recommenders.rcp.codecompletion.subwords which is available from here: git://git.eclipse.org/gitroot/recommenders/org.eclipse.recommenders.git For details, add your comments here or send them to the forum: http://eclipse.org/forums/eclipse.recommenders Related sources: http://code-recommenders.blogspot.com/2011/05/subword-matching-completion-engine-for.html
Created attachment 197311 [details] Benchmark plugin for relevance sorting Here is the plugin created to compare Jaro-Winckler and Levenshtein algorithms to compare strings and adjust relevance for subwords proposals. For tests purposes only.
Created attachment 198667 [details] NGrams algorithm Added NGrams calculation (with prefix pound)
Could you please again specify that you put the code under EPL, you authored the code etc. as you did in the last contribution? Thanks, Marcel
Created attachment 198692 [details] EPL Licence headers Ngram algorithm class with EPL licence I authored 100% of the content I am contributing I have the rights to contribute the content I'm contributing the content under the EPL
Relevance sorting requires JDT to run proposal sorting after each keystroke. This has been described in bug 350991, which blocks this one. Currently, no relevance computation is done but "JDT-Score -1" returned.
closing this bug for ip log generation. Please open a new bug for similar requests.