Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle snaktype: «somevalue». #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

klacointe
Copy link
Contributor

From http://www.wikidata.org/wiki/Wikidata:Glossary/en#Property

« Unknown value is a marker for when there is some value but the exact
value is not known for the property. "Some value" means that there is
nothing known for the value except that it should exist and not imply a
negation of the claim (example: if the date of a human's death is
completely unknown the item would receive this marker for date of death
(P570), denoting that the human is, in fact, dead — however, with the
date of death being unknown). »

From http://www.wikidata.org/wiki/Wikidata:Glossary/en#Property

« Unknown value is a marker for when there is some value but the exact
value is not known for the property. "Some value" means that there is
nothing known for the value except that it should exist and not imply a
negation of the claim (example: if the date of a human's death is
completely unknown the item would receive this marker for date of death
(P570), denoting that the human is, in fact, dead — however, with the
date of death being unknown). »
@@ -11,7 +11,9 @@ def property

def value
@value ||= begin
if datavalue['type'] == "wikibase-entityid"
if snaktype == "somevalue"
Wikidata::DataValues::String.new({string: "Unknown"})
Copy link
Owner

Choose a reason for hiding this comment

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

Perhaps this should be its own Value subclass since it represents something specific that isn't really a string?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep, will be smarter.

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.

2 participants