-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path35-search-module-api.Rmd
45 lines (22 loc) · 1.56 KB
/
35-search-module-api.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# Search module API
The search module API allows for processing of a search term on audioblast.org, and handles the display of relevant search results. Modules are typically related to a particular data type (i.e. a table in the audioblast database), although there are more abstract modules that solely process search terms in order to allow them to be processed by other modules.
## Search API class
### init()
### displayPrototype()
Create a region on the results page for displaying search results.
### parse()
Parses the search term for relevant terms, and may modify terms.
### display()
Handles the display of search results to the user.
### searchSuggests()
Provides a short list of indicative search terms that may be handled by the module. This is used to suggest search terms on the audioblast.org homepage.
## Current audioblast.org search modules
### Pythia
Pythia uses an audioBlast API to match words in the search term to tokens using direct access to the audioBlast database.
### Linnaeus: taxonomic name information and processing
The parse() function in Linnaeus takes a taxon name token identified by Pythia and converts it to a taxon name with rank token.
Linnaeus also handles the taxon info box, that provides search navigation through parent taxa.
### King Solomon's Ring
King Solomon's Ring converts everyday terms relating to animal behavior into named trait with value tokens (e.g. silent to sound production method being equal to None.)
### Rosetta
Rosetta handles the conversion of emoji in search terms to taxonomic names using the Phymoji package.