From: Dimitris K. <kon...@in...> - 2013-03-01 20:10:25
|
Hi Gerard On Fri, Mar 1, 2013 at 3:36 PM, Gerard Kuys <Ger...@bi...>wrote: > Hi Dimitris, > > The problem is about Mills and the mapping of Infobox_Molen. However, I > feel that this problem is far more general than just Mills. > > I want the mapping to do two things: > > 1. Type to the right Class. This worked quite well, except for the mapping > to WindMotors (but this is, I think, because of an owl:sameAs relation to > SustainableTechnologies, which is a totally different kind of problem. For > the rest, my (and yours!) result list of Mill objects was approved by the > Wikimedia specialist on Dutch mills, which is not the least of compliments). > It is good to hear that :) > > 2. If there is no monumentStatus property but indeed there is a > codeNationalMonument, then we can safely assume that the monumentStatus > property should be [[Rijksmonument]] for every mill that has a > codeNationalMonument and currently a blank for the monumentStatus. I would > like to do that in the mapping, but a CONSTRUCT statement might be a viable > aternative as well. > > These are two completely different conditions with different criteria, so > it is hard to combine them in the same list of conditional mappings, as you > will agree. > This is indeed very complex for the mappings. If you thing that this type of information is important we can try to extend the conditional mapping syntax, otherwise a construct would do Best, Dimitris > Regards, > > Gerard > ------------------------------ > *Van:* Dimitris Kontokostas [kon...@in...] > *Verzonden:* vrijdag 1 maart 2013 13:13 > > *To:* Gerard Kuys > *Cc:* dbp...@li... > *Onderwerp:* Re: [Dbpedia-dutch] Conditional mapping > > Hi Gerard, > > Unfortunately the condition template is very simple and you cannot add > logical expressions (at least for now). > The problem you refer to, that xtp4000 property will supersede the > otherwise rule, is very template specific and, > if you place that rule then I guess you want it to execute it if it > succeeds and so you shouldn't care what check comes next. > > If you want something different, then maybe you could share the high > level condition condition you want to achieve and the template / mapping > you refer to. > > Best, > Dimitris > > > On Fri, Mar 1, 2013 at 11:10 AM, Gerard Kuys <Ger...@bi...>wrote: > >> Hi Dimitris, >> >> Or, as a variety of the two-condition-list option: >> >> {{Condition >> | (templateProperty = type >> | operator = equals >> | value = River) && >> | (templateProperty = name >> | operator = contains >> | value = "River") >> | mapping = >> {{TemplateMapping >> | mapToClass = River >> }} >> }} >> >> Would this &&-approach work? (never mind the soundness of the example) >> >> Regards, >> >> Gerard >> >> >> ------------------------------ >> *Van:* Dimitris Kontokostas [kon...@in...] >> >> *Verzonden:* vrijdag 1 maart 2013 8:37 >> *To:* Gerard Kuys >> *Cc:* dbp...@li... >> *Onderwerp:* Re: [Dbpedia-dutch] Conditional mapping >> >> Although it will not throw an error I don't think it will work as >> expected because otherwise will supersede your last statement. >> Try to place the last condition just before the otherwise and it should >> be fine >> >> Best, >> Dimitris >> >> >> On Thu, Feb 28, 2013 at 11:40 PM, Gerard Kuys <Ger...@bi... >> > wrote: >> >>> Thank you, Dimitris, this documentation really is enlightening. One >>> last question, however. In the example I include below, there is a >>> condition statement with a 'case' clause. As is natural, this ends with an >>> 'otherwise' clause. Will the program when having processed this 'otherwise' >>> clause leave the entire condition section, or can I add another condition, >>> one that is not dependent on the condition (as below: 'templateProperty = >>> tpx10') to be fulfilled for the case...otherwise series? >>> >>> I mean this: >>> >>> {{ConditionalMapping >>> | cases = >>> {{Condition >>> | templateProperty = tpx10 >>> | operator = contains >>> | value = 'ABC' >>> | mapping = {{TemplateMapping >>> | mapToClass = Class1 >>> }} >>> }} >>> >>> {{Condition >>> | templateProperty = tpx10 >>> | operator = contains >>> | value = 'DEF' >>> | mapping = {{TemplateMapping >>> | mapToClass = Class2 >>> }} >>> }} >>> >>> {{Condition >>> | operator = otherwise >>> | mapping = {{TemplateMapping >>> | mapToClass =Class3 >>> }} >>> }} >>> >>> {{Condition >>> | templateProperty = xtp4000 >>> | operator = isSet >>> | mapping = {{ConstantMapping >>> | ontologyProperty = opx300 | value = 'GHI' >>> }} >>> }} >>> >>> Would this work? >>> >>> Regards, >>> >>> Gerard >>> ------------------------------ >>> *Van:* Dimitris Kontokostas [kon...@in...] >>> *Verzonden:* donderdag 28 februari 2013 21:48 >>> *To:* Gerard Kuys >>> *Cc:* dbp...@li... >>> *Onderwerp:* Re: [Dbpedia-dutch] Conditional mapping >>> >>> Hi Gerard, >>> >>> Although so-and-so is kind of ambiguous, for field existence you can >>> use the '*isSet' operator >>> >>> Complete documentation can be found here >>> http://mappings.dbpedia.org/index.php/Template:Condition >>> http://mappings.dbpedia.org/index.php/Template:ConditionalMapping >>> >>> and examples here: >>> >>> http://mappings.dbpedia.org/index.php?title=Special%3ASearch&search=isset&go=Go >>> >>> http://mappings.dbpedia.org/index.php/Special:WhatLinksHere/Template:Condition >>> >>> * >>> *Best, >>> Dimitris >>> * >>> * >>> >>> * >>> >>> >>> On Thu, Feb 28, 2013 at 9:38 AM, Gerard Kuys <Ger...@bi... >>> > wrote: >>> >>>> Hi all, >>>> >>>> I looked in the document on the DBpedia mapping language, but didn't >>>> find what I looked for: >>>> >>>> How can I, in a conditional mapping, express that the condition only >>>> fires if for field so-and-so there is a (or no) value? >>>> >>>> Thank you for answering! >>>> >>>> Regards, >>>> >>>> Gerard Kuys >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Everyone hates slow websites. So do we. >>>> Make your web apps faster with AppDynamics >>>> Download AppDynamics Lite for free today: >>>> http://p.sf.net/sfu/appdyn_d2d_feb >>>> _______________________________________________ >>>> Dbpedia-dutch mailing list >>>> Dbp...@li... >>>> https://lists.sourceforge.net/lists/listinfo/dbpedia-dutch >>>> >>>> >>> >>> >>> -- >>> Dimitris Kontokostas >>> Department of Computer Science, University of Leipzig >>> Research Group: http://aksw.org >>> Homepage:http://aksw.org/DimitrisKontokostas >>> >> >> >> >> -- >> Dimitris Kontokostas >> Department of Computer Science, University of Leipzig >> Research Group: http://aksw.org >> Homepage:http://aksw.org/DimitrisKontokostas >> > > > > -- > Dimitris Kontokostas > Department of Computer Science, University of Leipzig > Research Group: http://aksw.org > Homepage:http://aksw.org/DimitrisKontokostas > -- Dimitris Kontokostas Department of Computer Science, University of Leipzig Research Group: http://aksw.org Homepage:http://aksw.org/DimitrisKontokostas |