Skip to content

Instantly share code, notes, and snippets.

@lucaspg96
Last active May 17, 2018 13:36
Show Gist options
  • Save lucaspg96/c0b17f89abfb1b63ea64bd32e6cc1f34 to your computer and use it in GitHub Desktop.
Save lucaspg96/c0b17f89abfb1b63ea64bd32e6cc1f34 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Experimentos #1\n",
"\n",
"Este experimento foi feito utilizando a ontologia de Prêmio Nobel disponível no [datahub.io](https://old.datahub.io/dataset/nobelprizes), cujo esquema é representado (parcialmente) na imagem abaixo\n",
"\n",
"![Schema](https://i.imgur.com/qG2jNil.png \"schema\")\n",
"\n",
"O objetivo deste experimento é verificar se, a partir de um conjunto de keywords, o fragmento extraído do esquema é contém as informações referentes às keywords. Para isso, em cada pergunta a ser respondida, informaremos o framgento mínimo que contém as informações e calcularemos quantas das triplas estão contidas no fragmento obtido pela implementação, em porcentagem."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 1\n",
"---\n",
"### prize file from nobel prize laureate \n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Nobel_Prize> <file_prize> <Prize_File>`\n",
"\n",
"`<Laureate> <nobel_prize> <Nobel_Prize>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"\n",
"***`<Laureate> <nobelPrize> <Nobel_Prize>`***\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"`<Prize_File> <file_type> <File_Type>`\n",
"\n",
"`<Nobel_Prize> <year> year`\n",
"\n",
"***`<Nobel_Prize> <file_prize> <Prize_File>`***\n",
"\n",
"`<Nobel_Prize> <category> <NobelPrize_Category>`\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 2\n",
"---\n",
"### field of laureate award from laureate\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Laureate_Award> <laureate> <Laureate>`\n",
"\n",
"`<Laureate_Award> <field> field`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"\n",
"`<Laureate> <nobelPrize> <Nobel_Prize>`\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"`<Laureate_Award> <year> year`\n",
"\n",
"`<Laureate_Award> <awardFile> <Award_File>`\n",
"\n",
"***`<Laureate_Award> <laureate> <Laureate>`***\n",
"\n",
"`<Laureate_Award> <university> <University>`\n",
"\n",
"`<Laureate_Award> <share> share`\n",
"\n",
"`<Laureate_Award> <motivation> motivation`\n",
"\n",
"***`<Laureate_Award> <field> field`***\n",
"\n",
"`<Laureate_Award> <contribution> contribution`\n",
"\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 3\n",
"---\n",
"### award file and prize file from laureates\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"`<Nobel_Prize> <prizeFile> <Prize_File>`\n",
"\n",
"`<Laureate> <nobelPrize> <Nobel_Prize>`\n",
"\n",
"`<Laureate_Award> <awardFile> <Award_File>`\n",
"\n",
"`<Laureate_Award> <laureate> <Laureate>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"`<Laureate_Award> <year> year`\n",
"\n",
"***`<Laureate_Award> <awardFile> <Award_File>`***\n",
"\n",
"***`<Laureate_Award> <laureate> <Laureate>`***\n",
"\n",
"`<Laureate_Award> <university> <University>`\n",
"\n",
"`<Laureate_Award> <share> share`\n",
"\n",
"`<Laureate_Award> <motivation> motivation`\n",
"\n",
"`<Laureate_Award> <field> field`\n",
"\n",
"`<Laureate_Award> <contribution> contribution`\n",
"\n",
"`<Prize_File> <fileType> <File_Type>`\n",
"\n",
"`<Nobel_Prize> <year> year`\n",
"\n",
"***`<Nobel_Prize> <prizeFile> <Prize_File>`***\n",
"\n",
"`<Nobel_Prize> <category> <Nobel_Prize_category>`\n",
"\n",
"***`<Laureate> <nobelPrize> <Nobel_Prize>`***\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Experimentos #2\n",
"\n",
"Este experimento foi feito utilizando a mesma base do experimento anterior ([datahub.io](https://old.datahub.io/dataset/nobelprizes)).\n",
"\n",
"\n",
"O objetivo deste experimento é verificar se o método funciona entrando *keywords* com erros de digitação, fora de ordem ou sinônimos. Para isso, repetiremos as 3 perguntas do experimento anterior, porém trocaremos algumas letras, invertendo a ordem de algumas palavras e, quando possível, inseriremos sinônimos"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 1\n",
"---\n",
"### fiel prize from nobel pryze laureat \n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Nobel_Prize> <file_prize> <Prize_File>`\n",
"\n",
"`<Laureate> <nobel_prize> <Nobel_Prize>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"\n",
"***`<Laureate> <nobelPrize> <Nobel_Prize>`***\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"`<Prize_File> <file_type> <File_Type>`\n",
"\n",
"`<Nobel_Prize> <year> year`\n",
"\n",
"***`<Nobel_Prize> <file_prize> <Prize_File>`***\n",
"\n",
"`<Nobel_Prize> <category> <NobelPrize_Category>`\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 2\n",
"---\n",
"### subject of laurate award from laurate\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Laureate_Award> <laureate> <Laureate>`\n",
"\n",
"`<Laureate_Award> <field> field`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"\n",
"`<Laureate> <nobelPrize> <Nobel_Prize>`\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"`<Laureate_Award> <year> year`\n",
"\n",
"`<Laureate_Award> <awardFile> <Award_File>`\n",
"\n",
"***`<Laureate_Award> <laureate> <Laureate>`***\n",
"\n",
"`<Laureate_Award> <university> <University>`\n",
"\n",
"`<Laureate_Award> <share> share`\n",
"\n",
"`<Laureate_Award> <motivation> motivation`\n",
"\n",
"***`<Laureate_Award> <field> field`***\n",
"\n",
"`<Laureate_Award> <contribution> contribution`\n",
"\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 3\n",
"---\n",
"### file awad and fiel pryze from laureates\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"`<Nobel_Prize> <prizeFile> <Prize_File>`\n",
"\n",
"`<Laureate> <nobelPrize> <Nobel_Prize>`\n",
"\n",
"`<Laureate_Award> <awardFile> <Award_File>`\n",
"\n",
"`<Laureate_Award> <laureate> <Laureate>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"`<Laureate_Award> <year> year`\n",
"\n",
"***`<Laureate_Award> <awardFile> <Award_File>`***\n",
"\n",
"***`<Laureate_Award> <laureate> <Laureate>`***\n",
"\n",
"`<Laureate_Award> <university> <University>`\n",
"\n",
"`<Laureate_Award> <share> share`\n",
"\n",
"`<Laureate_Award> <motivation> motivation`\n",
"\n",
"`<Laureate_Award> <field> field`\n",
"\n",
"`<Laureate_Award> <contribution> contribution`\n",
"\n",
"`<Prize_File> <fileType> <File_Type>`\n",
"\n",
"`<Nobel_Prize> <year> year`\n",
"\n",
"***`<Nobel_Prize> <prizeFile> <Prize_File>`***\n",
"\n",
"`<Nobel_Prize> <category> <Nobel_Prize_category>`\n",
"\n",
"***`<Laureate> <nobelPrize> <Nobel_Prize>`***\n",
"\n",
"`<Laureate> <laureateAward> <Laureate_Award>`\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Experimentos #3\n",
"\n",
"Este experimento foi feito utilizando um recorte da ontologia MusicBrainz.\n",
"\n",
"\n",
"O objetivo deste experimento é verificar se, a partir de um conjunto de keywords, o fragmento extraído do esquema é contém as informações referentes às keywords. Para isso, em cada pergunta a ser respondida, informaremos o framgento mínimo que contém as informações e calcularemos quantas das triplas estão contidas no fragmento obtido pela implementação, em porcentagem."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 1\n",
"---\n",
"### musicArtist records\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<MusicArtist> <made_track> <Track>`\n",
"\n",
"`<Track> <publication_of> <Record>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"\n",
"`<Record> <track> <Track>`\n",
"\n",
"`<Record> <track_count> track_count`\n",
"\n",
"`<Record> <media_type> media_type`\n",
"\n",
"`<Record> <title> title`\n",
"\n",
"***`<Track> <publication of> <Record>`***\n",
"\n",
"`<Track> <duration> duration`\n",
"\n",
"`<Track> <title> title`\n",
"\n",
"`<Track> <track_number> track_number`\n",
"\n",
"`<MusicArtist> <made signal> <Signal>`\n",
"\n",
"`<MusicArtist> <based near> <SpatialThing>`\n",
"\n",
"***`<MusicArtist> <made track> <Track>`***\n",
"\n",
"`<MusicArtist> <made> <Release>`\n",
"\n",
"`<MusicArtist> <made> <Signal>`\n",
"\n",
"`<MusicArtist> <made> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <made> <Track>`\n",
"\n",
"`<MusicArtist> <made release> <Release>`\n",
"\n",
"`<MusicArtist> <member of> <MusicArtist>`\n",
"\n",
"`<MusicArtist> <made signalgroup> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <name> name`\n",
"\n",
"`<MusicArtist> <altLabel> altLabel`\n",
"\n",
"`<MusicArtist> <isPrimaryTopicOf> isPrimaryTopicOf`\n",
"\n",
"`<MusicArtist> <sortLabel> sortLabel`\n",
"\n",
"`<MusicArtist> <gender> gender`\n",
"\n",
"`<MusicArtist> <account> account`\n",
"\n",
"`<MusicArtist> <comment> comment`\n",
"\n",
"`<MusicArtist> <musicbrainz_guid> musicbrainz_guid`\n",
"\n",
"`<MusicArtist> <sameAs> sameAs`\n",
"\n",
"`<MusicArtist> <seeAlso> seeAlso`\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 2\n",
"---\n",
"### track release\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Release> <record> <Record>`\n",
"\n",
"`<Record> <track> <Track>`\n",
"\n",
"or\n",
"\n",
"`<Release> <record> <Record>`\n",
"\n",
"`<Track> <publication_of> <Record>`\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"`<Release> <factor> <SignalGroup>`\n",
"\n",
"`<Release> <label> <Label>`\n",
"\n",
"***`<Release> <record> <Record>`***\n",
"\n",
"`<musicbrainz> <guid_de> <Release>`\n",
"\n",
"`<Release> <comment> comment`\n",
"\n",
"`<Release> <title> title`\n",
"\n",
"***`<Track> <publication_of> <Record>`***\n",
"\n",
"`<Track> <duration> duration`\n",
"\n",
"`<Track> <title> title`\n",
"\n",
"`<Track> <track_number> track_number`\n",
"\n",
"`<MusicArtist> <made_signal> <Signal>`\n",
"\n",
"`<MusicArtist> <based_near> <SpatialThing>`\n",
"\n",
"`<MusicArtist> <made track> <Track>`\n",
"\n",
"`<MusicArtist> <made> <Release>`\n",
"\n",
"`<MusicArtist> <made> <Signal>`\n",
"\n",
"`<MusicArtist> <made> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <made> <Track>`\n",
"\n",
"`<MusicArtist> <made release> <Release>`\n",
"\n",
"`<MusicArtist> <member_of> <MusicArtist>`\n",
"\n",
"`<MusicArtist> <made signalgroup> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <name> name`\n",
"\n",
"`<MusicArtist> <altLabel> altLabel`\n",
"\n",
"`<MusicArtist> <isPrimaryTopicOf> isPrimaryTopicOf`\n",
"\n",
"`<MusicArtist> <sortLabel> sortLabel`\n",
"\n",
"`<MusicArtist> <gender> gender`\n",
"\n",
"`<MusicArtist> <account> account`\n",
"\n",
"`<MusicArtist> <comment> comment`\n",
"\n",
"`<MusicArtist> <musicbrainz_guid> musicbrainz_guid`\n",
"\n",
"`<MusicArtist> <sameAs> sameAs`\n",
"\n",
"`<MusicArtist> <seeAlso> seeAlso`\n",
"\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pergunta 3\n",
"---\n",
"### musicalWork from musicArtists\n",
"\n",
"\n",
"#### Esperado:\n",
"\n",
"\n",
"`<Composition> <produced_work> <MusicalWork>`\n",
"\n",
"`<Composition> <composer> <MusicalArtist>`\n",
"\n",
"\n",
"\n",
"#### Obtido:\n",
"\n",
"`<MusicArtist> <made signal> <Signal>`\n",
"\n",
"`<MusicArtist> <based near> <SpatialThing>`\n",
"\n",
"`<MusicArtist> <made track> <Track>`\n",
"\n",
"`<MusicArtist> <made> <Release>`\n",
"\n",
"`<MusicArtist> <made> <Signal>`\n",
"\n",
"`<MusicArtist> <made> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <made> <Track>`\n",
"\n",
"`<MusicArtist> <made release> <Release>`\n",
"\n",
"`<MusicArtist> <member of> <MusicArtist>`\n",
"\n",
"`<MusicArtist> <made signalgroup> <SignalGroup>`\n",
"\n",
"`<MusicArtist> <name> name`\n",
"\n",
"`<MusicArtist> <altLabel> altLabel`\n",
"\n",
"`<MusicArtist> <isPrimaryTopicOf> isPrimaryTopicOf`\n",
"\n",
"`<MusicArtist> <sortLabel> sortLabel`\n",
"\n",
"`<MusicArtist> <gender> gender`\n",
"\n",
"`<MusicArtist> <account> account`\n",
"\n",
"`<MusicArtist> <comment> comment`\n",
"\n",
"`<musicbrainz> <guid de> <MusicArtist>`\n",
"\n",
"`<MusicArtist> <sameAs> sameAs`\n",
"\n",
"`<MusicArtist> <seeAlso> seeAlso`\n",
"\n",
"`<MusicalWork> <lyrics> lyrics`\n",
"\n",
"`<MusicalWork> <musicbrainz_guid> musicbrainz_guid`\n",
"\n",
"`<MusicalWork> <isPrimaryTopicOf> isPrimaryTopicOf`\n",
"\n",
"`<MusicalWork> <comment> comment`\n",
"\n",
"***`<Composition> <produced work> <MusicalWork>`***\n",
"\n",
"***`<Composition> <composer> <MusicArtist>`***\n",
"\n",
"\n",
"#### Pertinência:\n",
"\n",
"100%"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.1"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment