=Paper= {{Paper |id=Vol-449/paper-13 |storemode=property |title=AJAX Widget for Semantic Query Expansion |pdfUrl=https://ceur-ws.org/Vol-449/Challenge4.pdf |volume=Vol-449 |dblpUrl=https://dblp.org/rec/conf/esws/TuominenKVH09a }} ==AJAX Widget for Semantic Query Expansion== https://ceur-ws.org/Vol-449/Challenge4.pdf
    AJAX Widget for Semantic Query Expansion

     Jouni Tuominen, Tomi Kauppinen, Kim Viljanen, and Eero Hyvönen

                    Semantic Computing Research Group (SeCo)
        Helsinki University of Technology (TKK) and University of Helsinki
                 http://www.seco.tkk.fi/, firstname.lastname@tkk.fi


      Abstract. We introduce the idea of utilizing ontologies as a service for
      query expansion, based on an AJAX widget. This ONKI Query Expan-
      sion Widget can be integrated into the search input field of a traditional
      keyword-based legacy system by one line of JavaScript code, making the
      search system semantic. For example, when searching for “tools”, also
      “hammers”, “axes” etc. can be found based on the underlying hyponymy.
      In the same vein, the spatial relations of a geo-ontology or temporal rela-
      tions can be utilized. Application of the widget in legacy search systems
      on the web is discussed by examples. The widget makes it possible to
      utilize the ontologies of the Finnish Ontology Library Service ONKI in
      a very cost-efficient way.


    Query expansion improves information retrieval by expanding the query
terms into an union of semantically related terms. To provide a general ontology-
based query expansion facility as a ready-to-use service, we took the previously
developed ONKI Selector Widget [1] as a starting point. This widget is used for
selecting concepts through semantic autocompletion in annotating, but with an
extension of less than 100 lines of code it was possible to change the widget into
the ONKI Query Expansion Widget.
    The ONKI Query Expansion Widget can be integrated into web-based sys-
tems providing them on-line expansion service of query terms into semantically
related concepts. The widget can utilize tens of ontologies published in the ONKI
Ontology Library Service1 by using its JavaScript API, which is implemented
with the Direct Web Remoting library2 . The idea is to provide the query expan-
sion functionality as an easily integrable mash-up service with no need to change
the underlying application system.
    The query widget supports both legacy systems using traditional keyword-
based search and Semantic Web systems using semantically disambiguated queries
based on URIs. Cross-language search can be performed, if the ontology used is
multi-lingual. In addition to the AJAX widget, the query expansion service can
also be utilized via JavaScript and Web Service APIs.
    The widget has been tested with general, domain-specific, and spatio-temporal
ontologies. With general and domain-specific ontologies, e.g. the Finnish Col-
laborative Holistic Ontology KOKO3 , we have used the transitive is-a relation
1
  http://www.yso.fi/
2
  http://directwebremoting.org/
3
  http://www.seco.tkk.fi/ontologies/koko/
(rdfs:subClassOf ) for expanding the query concepts with their subclasses. In case
of the Finnish Spatio-temporal ontology SAPO4 the place names in the query
are expanded to regionally overlapping current and historical places. Also other
relations could be used for query expansion by adjusting the ontology-specific
configuration files of the ONKI Ontology Service as desired.
    To integrate the ONKI widget into an application the following code is added
to the HTML source of the web page. First, the ONKI JavaScript library is
loaded into the browser:



   Then the input fields on the HTML page can be changed into ONKI widgets
by using a parametrized method call in the onkeyup-attribute:



    The functionalities of the widget can be customized by parametrizing the
method call. By default the selected query concepts and the concepts expanding
them are stored in hidden input fields to be sent to the application along with
the search form. A JavaScript callback method can be used, too. The form of the
query expression can be defined by providing a JavaScript method. For example,
in a Google query, disjunctive query terms term1 and term2 are expressed in
the form “term1 ” OR “term2 ”.
    For a demonstration we have used the Kantapuu.fi museum collection search
form5 , and created a copy of it with three integrated ONKI widgets for the fields
keywords, place of use, and material6 . Also a demonstration page consisting of
a Google search field with integrated ONKI widget is available7 .

Acknowledgements This work has been funded by Lusto The Finnish Forest
Museum8 . Partial funding was given by the FinnONTO project9 , funded by the
National Technology and Innovation Agency (Tekes) and 38 private and public
organizations, and the EU FP7 project SmartMuseum10 .

References
1. Viljanen, K., Tuominen, J., Hyvönen, E.: Publishing and using ontologies as mash-
   up services. In: Proceedings of the 4th Workshop on Scripting for the Semantic
   Web (SFSW 2008), 5th European Semantic Web Conference 2008 (ESWC 2008),
   Tenerife, Spain (June 1–5 2008)

4
   http://www.seco.tkk.fi/ontologies/sapo/
5
   http://www.kantapuu.fi/
 6
   http://www.yso.fi/kantapuu-qe/.
 7
   http://www.yso.fi/google-qe/
 8
   http://www.lusto.fi/
 9
   http://www.seco.tkk.fi/projects/finnonto/
10
   http://www.smartmuseum.eu/