11

I'd like to generate a compiled search TRIE file (like those found in $InstallationDirectory\SystemFiles\FrontEnd\SystemResources\FunctionalFrequency\) to help implement the auto-completion feature on user-defined functions.

As described in File-name completion for custom functions, I could directly add a list of strings into the specialArgFunctions.tr file. However, my lists of arguments is long and likely to change during development, so I'd prefer to point to a TRIE file that I can update as needed.

How can I create a compiled TRIE file? Can this be done in Mathematica or Workbench? Is the TRIE file extension structure documented anywhere?


b3m2a1 comment:

These files are here in v11:

FileNames["*.trie", 
  PacletFind["AutoCompletionData"][[1]]["Location"],
  Infinity
 ]

Similarly in 11 is CA`CADumpTriePacket which seems to extract the properties from a trie file, but not the trie format itself.

b3m2a1
  • 46,870
  • 3
  • 92
  • 239
Rashid
  • 1,523
  • 10
  • 18
  • @DanielLichtblau, Thanks for the link to 441, but I am not asking about general practices for implementing a trie data structure in Mathematica. I am looking for the specific TRIE file structure used by Mathematica's FrontEnd. – Rashid Apr 21 '16 at 00:52
  • You may be interested in this: http://mathematica.stackexchange.com/a/129910/12 It shows how to add completion without editing specialArgFunctions.tr. What I don't know how to do is enable completion of non-string arguments, as all examples that do this use .trie files and I don't know how to create such files. – Szabolcs Nov 02 '16 at 13:36
  • @Szabolcs, thanks for the suggestion. I will try it out and let you know if I make any progress. Thanks again! – Rashid Nov 05 '16 at 23:07

0 Answers0