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 atypeis anindividual. Sherlock Holmes is anindividualof thetypecharacter.data-property: A relationship between atypeand aliteral. The querycharacters containing “Sherlock”uses thedata-propertycontainsto 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 atypeand anindividualor twoindividuals. The currently definedobject-propertiesareis-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.Manuscriptis the top-level discourse element.
The following semantic patterns are recognized by Granthika’s search engine:
literalonly: 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.typeonly: Will find all theindividualsof the given type. Soeventoreventswill find all events like “Watson Writes Memoirs.”individualonly: Will findindividualsthat have the entered name. SoHolmeswill find “Sherlock Holmes” (a character) and “Holmes in Practise” (an event), andofficewill find “Sherlock’s Office” (a location).type object-property individual: Will find allindividualsfrom the giventypewhich have the relationship specified by the givenobject-propertywith theindividual. Soevents with participant Sherlock Holmeswill find all events that have Sherlock Holmes as a participant, andcharacters mentioned Chapter 2will find all characters that are mentioned in Chapter 2.object-property invidual: Works liketype object-property individual, but will infer thetypeof theindividual. Sohave location officeinfers that you are looking for events, and will find all events that have Sherlock’s Office as a location. Similarly,mentions Holmesinfers that you are looking for all discourse elements that mention Sherlock Holmes.mentioned by Chapter 1will infer that you are looking for any story element mentioned within Chapter 1.type data-property literal: Will findindividualsfrom the giventypethat have the relationship specified by thedata-propertywith the givenliteral. Socharacters containing “Ronder”will find all characters that have the string “Ronder” in their name (Mr. Ronder and Mrs. Ronder).object-propertyalone: Finds allindividualsthat engage in a relationship via the givenobject-property. Soparticipantswill find all characters who participate in any events, anddepictingwill 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 allindividualswhich areobjectsfor the givenobject-property. SoHolmes in Practise participantwill 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