Saturday, April 8, 2017

How to load part of the LuceneIndex of PowerAqua

Open up Luke:
































Search for terms in the ontology at https://www.w3.org/TR/2003/PR-owl-guide-20031215/food

Double click on a row for a result:















Choose "Copy Text to Clipboard: Complete Document" . Paste the result into a file:

stored/uncompressed,omitNorms<URI:http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid>
stored/uncompressed,omitNorms<entityLabel:PotableLiquid>
stored/uncompressed,omitNorms<entityType:class>
stored/uncompressed,omitNorms<pluginID:http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD>


Once the file is complete, select URI, entityLabel, entityType, and pluginID

cat palucene.txt | grep -o "<URI.*>" | sed 's/URI://g' | sed 's/[<>]*//g'
cat palucene.txt | grep -o "<entityLabel.*>" | sed 's/entityLabel://g' | sed 's/[<>]*//g'
etc..

Put the result of each operation into a spreadsheet, and export as CSV to get a text file like below:


URI,entityLabel,entityType,pluginID
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#ConsumableThing,ConsumableThing,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#NonConsumableThing,NonConsumableThing,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#EdibleThing,EdibleThing,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#PotableLiquid,PotableLiquid,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Wine,Wine,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#madeFromFruit,madeFromFruit,property,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Fruit,Fruit,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Juice,Juice,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#hasDrink,hasDrink,property,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#MealCourse,MealCourse,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#course,course,property,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Grape,Grape,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#SweetFruit,SweetFruit,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Pasta,Pasta,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD
http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#Meat,Meat,class,http://kmi-web07.open.ac.uk:8080/sesame/WINE_FOOD

Go to document: fileupload






















Then run a query to see that the document is loaded. (Earlier I created a schema).













No comments:

Post a Comment