Query Language
Granthika’s search engine supports the following semantic elements:
literal
: Text enclosed in double quotation marks, such as “pipe,” “Sherlock Holmes,” “he was excited.”individual
: An instance of atype
is anindividual
. Sherlock Holmes is anindividual
of thetype
character.data-property
: A relationship between atype
and aliteral
. The querycharacters containing “Sherlock”
uses thedata-property
contains
to find all characters which have the string “Sherlock” in their names, and similarlyscenes containing “Sherlock”
finds all scenes with the string “Sherlock” within their text.object-property
: A relationship between atype
and anindividual
or twoindividuals
. The currently definedobject-properties
areis-participant
,is-sub-event
,have-location
, anddepicts
. These allow queries such asevents with participant Sherlock Holmes
.All discourse elements are represented by the term
Discourse
.Manuscript
is the top-level discourse element.
The following semantic patterns are recognized by Granthika’s search engine:
literal
only: Queries such as“agonized letters”
and“no fear”
. The search engine looks for the single word entered, or (if entered) a phrase, and–in the latter case–if there are no results, falls back to searching for individual words within the search term. The results will list discourse elements that contain the matches found and highlights the occurrences of the entered search term.type
only: Will find all theindividuals
of the given type. Soevent
orevents
will find all events like “Watson Writes Memoirs.”individual
only: Will findindividuals
that have the entered name. SoHolmes
will find “Sherlock Holmes” (a character) and “Holmes in Practise” (an event), andoffice
will find “Sherlock’s Office” (a location).type object-property individual
: Will find allindividuals
from the giventype
which have the relationship specified by the givenobject-property
with theindividual
. Soevents with participant Sherlock Holmes
will find all events that have Sherlock Holmes as a participant, andcharacters mentioned Chapter 2
will find all characters that are mentioned in Chapter 2.object-property invidual
: Works liketype object-property individual
, but will infer thetype
of theindividual
. Sohave location office
infers that you are looking for events, and will find all events that have Sherlock’s Office as a location. Similarly,mentions Holmes
infers that you are looking for all discourse elements that mention Sherlock Holmes.mentioned by Chapter 1
will infer that you are looking for any story element mentioned within Chapter 1.type data-property literal
: Will findindividuals
from the giventype
that have the relationship specified by thedata-property
with the givenliteral
. Socharacters containing “Ronder”
will find all characters that have the string “Ronder” in their name (Mr. Ronder and Mrs. Ronder).object-property
alone: Finds allindividuals
that engage in a relationship via the givenobject-property
. Soparticipants
will find all characters who participate in any events, anddepicting
will find all discourse elements that depict any events.data-property literal
: This works liketype data-property literal
, but looks for anyindividual
, disregarding itstype
. Socontain “pipe”
will find any discourse element that contains “pipe” within its text.individual object-property
: Finds allindividuals
which areobjects
for the givenobject-property
. SoHolmes in Practise participant
will find all the characters who participate in the event “Holmes in Practise,” and “Allahabad locate” will find all the events that have Allahabad as a location.
Last updated