Property talk:P6827

From Wikidata
Jump to navigation Jump to search

Documentation

Igromania ID
identifier for a video game at the website Igromania.ru
Associated itemIgromania (Q4197757)
Applicable "stated in" valueIgromania (Q4197757)
Data typeExternal identifier
Domainvideo game (Q7889), video game compilation (Q16070115) or group of video games often treated as a singular game (Q116779426)
Allowed values^[1-9]\d{0,5}$ (numeric string in the range from 1 to 999999)
ExampleThe Last of Us Part II (Q27950674)23766
Death Stranding (Q24666782)21791
Ghost of Tsushima (Q42564798)28874
God of War (Q18345138)21787
Sourcehttps://www.igromania.ru/games/
Formatter URLhttps://www.igromania.ru/game/$1/-
Related to country Russia (Q159) (See 345 others)
See alsoIgromania company ID (P9832), Igromania series ID (P9835)
Lists
Proposal discussionProposal discussion
Current uses
Total9,479
Main statement9,047 out of 383,320 (2% complete)95.4% of uses
Qualifier4<0.1% of uses
Reference4284.5% of uses
Search for values
[create Create a translatable help page (preferably in English) for this property to be included here]
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Single value, SPARQL
Distinct values: this property likely contains a value that is different from all other items. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Unique value, SPARQL (every item), SPARQL (by value)
Format “^[1-9]\d{0,5}$: value must be formatted using this pattern (PCRE syntax). (Help)
List of violations of this constraint: Database reports/Constraint violations/P6827#Format, hourly updated report, SPARQL
Scope is as reference (Q54828450), as main value (Q54828448): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Scope, SPARQL
Allowed entity types are Wikibase item (Q29934200): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Entity types
Conflicts with “instance of (P31): video game series (Q7058673), video game developer (Q210167), human (Q5), video game publisher (Q1137109): this property must not be used with the listed properties and values. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Conflicts with P31, SPARQL
Label required in languages: ru: Entities using this property should have labels in one of the following languages: ru (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303).
List of violations of this constraint: Database reports/Constraint violations/P6827#Label in 'ru' language, search, SPARQL
This property is being used by:

Please notify projects that use this property before big changes (renaming, deletion, merge with another property, etc.)


Discussion[edit]

format as a regular expression[edit]

@Kirilloparma: after your edits User:1Veertje/identifierInput.js script began to truncate Igromania identifiers down to one symbol (I copypasted https://www.igromania.ru/game/415/Konung_Legends_of_the_North.html and got this). It might be script bug, still, is it really necessary to make regexps that precise? Are you planning to update them as soon as Igromania would add 383321st game to database? (: Facenapalm (talk) 16:50, 5 July 2023 (UTC)[reply]

@Facenapalm: Thank you for bringing this to my attention. I will try these days to figure out what the problem is. At first glance, yes, it seems that there may be a problem in the gadget's script, as for some reason it does not work well with regexes with a certain range. For instance, a similar situation happens with OpenCritic outlet ID (P11223) (range from 17 to 999) property where the gadget strangely selects only some numbers and doesn't take into account other numbers allowed in the regex. By the way maybe the regex itself or its format is wrong? Although I checked it several times and everything seems to be fine.
> is it really necessary to make regexps that precise?
Specifically for this property I think so, because by significantly reducing the range we will be able to keep track of situations like this, where we have an identifier added by mistake. Also keeping a numeric string from 1 to 999999 doesn't make much sense, precisely because Igromania stopped adding new games to the database from 383320 onwards.
> Are you planning to update them as soon as Igromania would add 383321st game to database?
Yes, I plan to update the regex as soon as Igromania starts adding new games to the database. However here it will all depend on how often games will be added. If only 5 games will be added in a month, we will update the regex up to 10 numbers, so this time the last allowed number in the regex will be 383330. Kirilloparma (talk) 05:20, 6 July 2023 (UTC)[reply]
@Kirilloparma, I assume arranging the regex other way around might solve the problem: e.g. ^...|[12]\d{5}|[1-9]\d{1,4}|[1-9]$ instead of ^[1-9]|[1-9]\d{1,4}|[12]\d{5}|...$. My assumption is that the script uses these regexes to search for ID, and ignores ^ and $ for that purpose. In this case your regex would always match one digit only. When there're several expressions separated by |, engine goes left-to-right, and stops checking at the first match. So you should always go from the most specific to the most common. Facenapalm (talk) 10:17, 6 July 2023 (UTC)[reply]
From what I could gather from glancing at the sources, the issues are likely caused by using one flavor of regular expressions in a regular expression engine meant for a different flavor. Infrastruktur (talk) 13:10, 6 July 2023 (UTC)[reply]
@Facenapalm: > I assume arranging the regex other way around might solve the problem
Yes, let's try a rearrangement and see if that helps us.
> My assumption is that the script uses these regexes to search for ID, and ignores ^ and $ for that purpose. In this case your regex would always match one digit only. When there're several expressions separated by |, engine goes left-to-right, and stops checking at the first match.
That's the way it is. The script in our case picks up only the first regex (example: ([1-9]|[1-9]\d{1,4}|[12]\d{5}|3[0-7]\d{4}|38[0-2]\d{3}|383[0-2]\d{2}|3833[01]\d|383320) and completely ignores the others, which is odd, since I've seen property like P6150 where such problems are not observed. I think that here it is better to try to directly contact the creator of this script, to inquire why this happens, or as another option, maybe try to create a complex constraint, which can help us track violations? Not sure, to be honest. Regards Kirilloparma (talk) 06:13, 8 July 2023 (UTC)[reply]
Update @Facenapalm: Well, as far as I can see, the rearranging still didn't help, so I think the only option for now, though not the best one, is to use the complex constraint (here it is; result) to track down such cases. I've restored the previous regex so that we can use identifierInput script again. Regards Kirilloparma (talk) 02:57, 10 July 2023 (UTC)[reply]
Thank you. Facenapalm (talk) 10:34, 10 July 2023 (UTC)[reply]