SKOS-2-HIVE. UNT workshop. Introductions. Craig Willis (craig.willis@unc.edu). Afternoon Session Schedule. Overview Using HIVE as a service Installing and configuring HIVE Using HIVE Core API Understanding HIVE Internals HIVE supporting technologies Developing and customizing HIVE.
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
Afternoon Session Schedule Overview Using HIVE as a service Installing and configuring HIVE Using HIVE Core API Understanding HIVE Internals HIVE supporting technologies Developing and customizing HIVE
Background and Interests • What are you most interested in getting out of this part of the workshop? • What is your background? • Cataloging, indexing, and classification • Programming and databases • Systems administration • What is your level of familiarity with the following technologies? • Java, Tomcat, Lucene • REST • RDF, SPARQL, SKOS, Sesame
HIVE Technical Overview • HIVE consists of many technologies combined to provide a framework for vocabulary services • System for management of multiple controlled vocabularies in SKOS/RDF format • Java-based web services can run in any Java application server • Demonstration website (http://hive.nescent.org/) • Google Code project (http://code.google.com/p/hive-mrc/)
HIVE Architecture • SPARQL:RDF query language (W3C recommendation) • REST: Web-based API and software architecture • Triple store: Database for the storage and retrieval of RDF data. Supports queries using SPARQL. • Sesame: Open source triple store • Elmo: Sesame API for common ontologies (OWL, Dublin Core, SKOS) • Lucene: Java-based search engine • KEA++: Algorithm and Java API for automatic subject suggestions from controlled vocabularies.
HIVE Functions • Conversion of vocabularies to SKOS • Rich internet application (RIA) for browsing and searching multiple SKOS vocabularies • Java API and REST application interfaces for programmatic access to multiple SKOS vocabularies • Support for natural language and SPARQL queries • Automatic keyphrase indexing using multiple SKOS vocabularies. HIVE supports two indexers: • KEA++ indexer • Basic Lucene indexer
Using HIVE as a Service • HIVE web application • http://hive.nescent.org/ • Developed by Jose Perez-Aguera, Lina Huang • Java servlet, Google Web Toolkit (GWT) • http://code.google.com/p/hive-mrc/wiki/AboutHiveWeb • HIVE REST service • http://hive.nescent.org/rs • Developed by Duane Costa, Long-Term Ecological Research Network • http://code.google.com/p/hive-mrc/wiki/AboutHiveRestService
edu.unc.ils.hive.api • SKOSServer: • Provides access to one or more vocabularies • SKOSSearcher: • Supports searching across multiple vocabularies • SKOSTagger: • Supports tagging/keyphrase extraction across multiple vocabularies • SKOSScheme: • Represents an individual vocabulary (location of vocabulary on file system)
SKOSServer • SKOSServer is the top-level class used to initialize the vocabulary server. • Reads the hive.properties file and initializes the SKOSScheme (vocabulary management), SKOSSearcher (concept searching), SKOSTagger (indexing) instances based on the vocabulary configurations. • edu.unc.ils.mrc.hive.api.SKOSServer • TreeMap<String, SKOSScheme> getSKOSSchemas(); • SKOSSearcher getSKOSSearcher(); • SKOSTagger getSKOSTagger(); • String getOrigin(QName uri);
SKOSSearcher • Supports searching across one or more configured vocabularies. • Keyword queries using Lucene, SPARQL queries using OpenRDF/Sesame • edu.unc.ils.mrc.hive.api.SKOSSearcher • searchConceptByKeyword(uri, lp) • searchConceptByURI(uri, lp) • searchChildrenByURI(uri, lp) • SPARQLSelect()
SKOSTagger • Keyphrase extraction using multiple vocabularies • Depends on setting in hive.properties • edu.unc.ils.mrc.hive.api.SKOSTagger • “dummy” or “KEA” • List<SKOSConcept> getTags(String text, List<String> vocabularies, SKOSSearcher searcher);
SKOSScheme Represents an individual vocabulary, based on settings in <vocabulary>.properties Supports querying of statistics about each vocabulary (number of concepts, number of relationships, etc).
Activity Demonstrate a simple Java class that allows the user to query for a given term. Demonstrate a simple Java class that can read a text file and call the tagger.
Data Directory Layout • /usr/local/hive/hive-data • vocabulary/ • vocabulary.rdf SKOS RDF/XML • vocabularyAlphaIndex Serialized map • vocabularyH2 H2 database (used by KEA) • vocabularyIndex Lucene Index • vocabularyKEA KEA model and training data • vocabularyStore Sesame/OpenRDF store • topConceptIndex Serialized map of top concepts
HIVE Internals: Data Models Lucene Index: Index of SKOS vocabulary (view with Luke) Sesame/OpenRDF Store: Native/Sail RDF repository for the vocabulary KEA++ Model: Serialized KEAFilter object H2 Database: Embedded DB contains SKOS vocabulary in format used by KEA. (Can be queried using H2 command line) Alpha Index: Serialized map of concepts Top Concept Index: Serialized map of top concepts
HIVE Internals: HIVE Web • GWT Entry Points: • HomePage • ConceptBrowser • Indexer • Servlets • VocabularyService: Singleton vocabulary server • FileUpload: Handles the file upload for indexing • ConceptBrowserServiceImpl • IndexerServiceImpl
HIVE Internals: HIVE-RS • Java API for RESTful Web Services (JAX-RS) • Classes • ConceptsResource: • SchemesResource
Activity • Explore Lucene index with Luke • http://luke.googlecode.com/ • Explore Sesame store with SPARQL • http://www.xml.com/pub/a/2005/11/16/introducing-sparql-querying-semantic-web-tutorial.html • http://www.cambridgesemantics.com/2008/09/sparql-by-example/
Obtaining Vocabularies Several vocabularies can be freely downloaded Some vocabularies require licensing HIVE Core includes converters for each of the supported vocabularies. List of HIVE vocabularieshttp://code.google.com/p/hive-mrc/wiki/VocabularyConversion
Converting Vocabularies to SKOS • Additional information • http://code.google.com/p/hive-mrc/wiki/VocabularyConversion • Each vocabulary has different requirements
Converting Vocabularies to SKOS • A Method to Convert Thesauri to SKOS (van Assem et al) • Prolog implementation • IPSV, GTAA, MeSH • http://thesauri.cs.vu.nl/eswc06/ • Converting MeSH to SKOS for HIVE • Java SAX-based parser • http://code.google.com/p/hive-mrc/wiki/MeshToSKOS
About KEA++ • http://www.nzdl.org/Kea/ • Algorithm and open-source Java library for extracting keyphrases from documents using SKOS vocabularies. • Developed by Alyona Medelyan (KEA++), based on earlier work by Ian Whitten (KEA) from the Digital Libraries and Machine Learning Lab at the University of Waikato, New Zealand. • Problem: How can we automatically identify the topic of documents?
Automatic Indexing Medelyan, O. and Whitten I.A. (2008). “Domain independent automatic keyphrase indexing with small training sets.” Journal of the American Society for Information Science and Technology, (59) 7: 1026-1040). • Free keyphrase indexing (KEA) • Significant terms in a document are determined based on intrinsic properties (e.g., frequency and length). • Keyphrase indexing (KEA++) • Terms from a controlled vocabulary are assigned based on intrinsic properties. • Controlled indexing/term assignment: • Documents are classified based on content that corresponds to a controlled vocabulary. • e.g., Pouliquen, Steinberger, and Camelia (2003)
KEA++ at a Glance • KEA++ uses a machine learning approach to keyphrase extraction • Two stages: • Candidate identification: Find terms that relate to the document’s content • Keyphrase selection: Uses a model to identify the most significant terms.
KEA++: Candidate identification Parse tokens based on whitespace and punctuation Create word n-grams based on longest term in CV Stem to grammatical root (Porter) Stem terms in vocabulary (Porter) Replace non-descriptors with descriptors using CV relationships Match stemmed n-grams to vocabulary