Skip to content

Update project4 madness#6

Open
dmcnulty27 wants to merge 4 commits into
mainfrom
dmcnulty27-project4-madness
Open

Update project4 madness#6
dmcnulty27 wants to merge 4 commits into
mainfrom
dmcnulty27-project4-madness

Conversation

@dmcnulty27

Copy link
Copy Markdown
Owner

No description provided.

@dmcnulty27 dmcnulty27 changed the title Update README.md Update project4 madness Mar 27, 2023
Comment thread Project 4/README.md
FILTER (REGEX(STR(?id), “Batman_films_casts”, “I”))
}

Kata Level 6 – 6 points

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work but if we already know that Bell invented the telephone when we look for him in the regex query, why write a query in the first place? I think the query should work in any case without using the regex function in any case

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for your note! I will remove the regex function

Comment thread Project 4/README.md
It is your responsibility and the responsibility of your peers reviewing your submission in PR to determine whether your submission is ranked appropriately. In the event that consensus is reached that your kata is ranked inappropriately, you must work with your peers to revise the submission so that it is either more or less challenging, accordingly. You are not permitted to submit new problems with different strengths after PRs are open, but must instead revise your PRs. So, think hard about how challenging your submission is.

There is one other option for those desiring a different sort of challenge. If you provide alongside your SPARQL submission a translation of the same problem into SQL, complete with documentations, solution, etc. then you may receive half points extra at that kata level (rounded up). For example, if you submit a SPARQL problem that is kata rank 1 and also submit a SQL version of that same problem, you will receive 35+18=53 points.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I apologize for sending my review just now, I completely missed the notification from github. If this happens again, please feel free to notify me in any other way.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries :)

Comment thread Project 4/README.md
?film dbo:starring ?act .
?film dbo:wikiPageRedircts dbr:Batman_(film_series) .
?actor dbo:wikiPageID ?id .
FILTER (REGEX(STR(?id), “Batman_films_casts”, “I”))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure about this line. As I read it, you are asking the id to contain the term "Batman_films_casts", but this doesn't seem to be something that is stored in an id.
I also believe there might be a typo on line 55, where you have "starring ?act" (I was guessing it was ?actor, but of course I may be wrong).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I chose starring ?act because there could be multiple actors in a given project but the starring act would be the star of the film. I could change it to lead ?act. Additionally, I am hesitant to use actor as there is a big push in hollywood to call all actors actors -- not discriminate between male/non-binary/female etc.. so the starring act can account for this shift.... I hope lol

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah you can definitely use the term you believe fits best in this situation (sorry for not recognising what was going on), my issue was that you probably want it to be the same term you then use in line 57, where you wrote ?actor, since it seems you want to refer to the same entity

Comment thread Project 4/README.md
SELECT DISTINCT ?class
WHERE {
?s a ?class .
FILTER (strstarts(str(?class), http://dbpedia.org/ontology/))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You probably don't even need the FILTER clause, and this will be a perfect easy level 8

Comment thread Project 4/README.md Outdated

CONSTRUCT {
?book rdf:type dc:Book ;
dc:title >?title ;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo >

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch ! Thank you!!

Comment thread Project 4/README.md Outdated
?otherBook rdf:type dc:Book ;
dc:creator ?author ;
genre:ScienceFicton ?genre .
Filter (?otherBook !=?book)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's say that an author has written only one book, of genre science fiction. I wonder whether it would fall outside of the scope of this query, because it doesn't have an ?otherbook.
It is probably easier to rewrite the question than to rewrite the query. As I see it now, it seems to ask for all the authors that have at least two books, at least one of which is a sci fi book.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second this. Maybe you should use a OPTIONAL keyword to deal with ?otherbook, Delaney.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had not considered this. Thank you for pointing this out I will rewrite the question

Comment thread Project 4/README.md
^^<http://www.w3.org/2001/XMLSchema#date>)
}

Kata level 6? -- 19 points

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is a level 6, yes

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WAHOOOOOOOOOO

Comment thread Project 4/README.md
ORDER BY DESC(?publicationDate)
LIMIT 10

Level 5? -- 21 points

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ok but I would say it is a level 6, not a level 5. For a level 5 I am thinking of a bit more complex queries with multiple "tricks" (filter, regex, comparison of values, etc.)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmmm thank you. Maybe I can further complicate it...

@peihongx peihongx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dmcnulty27 Hi Delaney, I've finished my review of your kata changllenges. BTW, ZOMBIE movie (e.g. Shaun of the Dead) are my favorite type of horror films!

Comment thread Project 4/README.md

Select Distinct ?actor WHERE {

?film dbo:starring ?act .

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Second Giacomo's comment: I tend to think here "?act" should be "?actor".

Comment thread Project 4/README.md

?actor dbo:wikiPageID ?id .

FILTER (REGEX(STR(?id), “Batman_films_casts”, “I”))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find you use "I" in regex() function. Do you care whether an ID string is in uppercase or lowercase? If not, maybe it is better to use "i". Also, I suspect whether this challenge is kata 7 because although you use a complex function in FILTER, but a reader may not notice it without reading your sample solution. After all, intuitively, it seems that a solution only need 2 substantive lines:

WHERE{?film :label "Batman".
?film dbo:starring ?actor
}

Maybe you can make it more complex, for example, by requesting women actors starrring Batman before 2000?

Comment thread Project 4/README.md
Filter (regex(?name, “Bell”, “I”))

}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Delaney, it seems that you need to add a triple to emphasize that ?telephone is a telephone (as rdf:type). Otherwise, readers cannot know what type of device ?telephone is. (After all, technically speaking, ?telephone is not different from ?s.) Also, I suspect that this is a kata 8 because it is somewhat similar to Jaron's Buffalo Wing example in Goog Doc. Maybe you can make it more difficult by querying more info about telephone's inventor (e.g. his company, or his patents in telephone).

Comment thread Project 4/README.md
PREFIX foaf: http://xmlns.com/foaf/0.1/

Select ?name

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you miss WHERE after "SELECT ..." BTW, I suggest to capitalize keywords like "filter", "select", "where" and so on in their all letters.

Comment thread Project 4/README.md

Kata level 8 – 0 points

Return all classes -- (A is shorthand for rdfs; type)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"rdf:type" instead of "rdf;type"

Comment thread Project 4/README.md
}


using dbpedia generate a sparql query using constructs query to create a graph about films featuring Sacha Baron Cohen

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "constructs" → “CONSTRUCT”

Comment thread Project 4/README.md

using dbpedia generate a sparql query using constructs query to create a graph about films featuring Sacha Baron Cohen
Kata level 5 -- 87 points

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can construct data about the actors who cast together with Sacha Baron Cohen for at least 2 films, so this challenge can reach level 5 or higher.

Comment thread Project 4/README.md



CONSTRUCT {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider making this challenge harder by constructing some new data different from those in WHERE.

Comment thread Project 4/README.md

# Get Tim Curry's information

dbr:Tim_Curry dbo:occupation dbo:Actor ;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This triple has no variable. Do you really need it?

Comment thread Project 4/README.md
}

ORDER BY DESC(?year)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe you can add LIMIT 20 or something like this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants