Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Generate suggested text for autocompletion of a search query
ResourceFunction["AutocompleteSearchQuery"]["query"] gives a suggested string to autocomplete the text "query". | |
ResourceFunction["AutocompleteSearchQuery"]["query",n] gives a list of the top n results. | |
ResourceFunction["AutocompleteSearchQuery"][n] represents an operator form of ResourceFunction["AutocompleteSearchQuery"] that can be applied to a string. |
Autocomplete search queries:
In[1]:= |
Out[1]= |
In[2]:= |
Out[2]= |
In[3]:= |
Out[3]= |
In[4]:= |
Out[4]= |
Specify the number of autocompletions to get:
In[5]:= |
Out[5]= |
In[6]:= |
Out[6]= |
Get all available autocompletions:
In[7]:= |
Out[7]= |
Use the operator form of AutocompleteSearchQuery:
In[8]:= |
Out[8]= |
Generate a list of questions:
In[9]:= |
Out[9]= |
Find common search queries from random words:
In[10]:= |
Out[10]= |
AutocompleteSearchQuery supports using UpTo:
In[11]:= |
Out[11]= |
AutocompleteSearchQuery does not return any completions for an empty string:
In[12]:= |
Out[12]= |
In[13]:= |
Out[13]= |
The query can contain characters that are not letters:
In[14]:= |
Out[14]= |
Results may be dependent on location:
In[15]:= |
Out[15]= |
Compare to evaluating from a different physical location:
In[16]:= |
Out[16]= |
AutocompleteSearchQuery can handle spelling errors in the query:
In[17]:= |
Out[17]= |
In[18]:= |
Out[18]= |
Requesting more completions than are available will result in a partial list along with a warning message:
In[19]:= |
Out[19]= |
The generated text will always be lowercase:
In[20]:= |
Out[20]= |
In[21]:= |
Out[21]= |
Case is only preserved if the query appears at the beginning of the output string:
In[22]:= |
Out[22]= |
In[23]:= |
Out[23]= |
AutocompleteSearchQuery requires an internet connection:
In[24]:= |
Out[24]= |
In[25]:= |
Out[25]= |
Use AutocompleteSearchQuery as a FieldCompletionFunction:
In[26]:= |
Out[26]= |
Have a bird predict what you’re going to say next:
In[27]:= |
Out[27]= |
This work is licensed under a Creative Commons Attribution 4.0 International License