简体   繁体   English

owl和rdf中的计量单位

[英]units of measurement in owl and rdf

I'm creating linked data of materials and their physical properties, and I'm having trouble with setting units for certain properties. 我正在创建材料及其物理属性的链接数据,而我在为某些属性设置单位时遇到问题。 My individual material :AlMg3 has some mechanical properties like: 我的个人材料:AlMg3具有一些机械性能,如:

:AlMg3 prop:hasTensileStrength "300" .
:AlMg3 prop:hasYieldStrength   "2" .
:alMg3 prop:hasDensity         "2200" .

How to put units for that values? 如何为这些值设置单位? My first idea was to make new datatypes, eg: 我的第一个想法是创建新的数据类型,例如:

unit:megaPascal rdf:type   rdfs:datatype ;
                rdfs:label "MPa" .

unit:Pascal rdf:type   rdfs:datatype ;
                rdfs:label "Pa" .

and then use them like this: 然后像这样使用它们:

:AlMg3 prop:hasTensileStrength "300"^^unit:megaPascal .
:AlMg3 prop:hasYieldStrength   "2"^^unit:Pascal .

Then I'd want to relate these units like this: 然后我想把这些单位联系起来:

unit:megaPascal prop:hasBaseUnit   unit:Pascal .
unit:pascal     prop:hasBaseSIUnit unit:kilogramPerMeterSecondSquared .

Is this possible? 这可能吗? The units would be datatypes, and I can't put datatype properties between them, except for annotation properties? 单位是数据类型,我不能在它们之间放置数据类型属性,除了注释属性? Is it possible to make those units individuals (or even classes) and use them like that a datatype after some value? 是否有可能使这些单位个体(甚至是类)并使用它们之后的数据类型?

I saw OWL ontologies for QUDT (Quantities, Units, Dimensions and Data Types), but I was going to try to create something simpler myself. 我看到了用于QUDT(数量,单位,尺寸和数据类型)的OWL本体,但我打算尝试创建一些更简单的东西。

You can use whatever datatypes you like, but the problem if you do that (eg, using "300"^^unit:megaPascal ) is that you can no longer do arithmetic on them, and you can't get any validation of the lexical forms from any of the standard tools. 您可以使用您喜欢的任何数据类型,但如果您这样做(例如,使用"300"^^unit:megaPascal )的问题是您不能再对它们进行算术运算,并且您无法对词汇进行任何验证来自任何标准工具的表格。 Better options are to add some documentation to your properties and use literals with supported datatypes, or use some structured values for these measurements. 更好的选择是向属性添加一些文档,并使用支持数据类型的文字,或者为这些测量使用一些结构化值。

Documentation and standard datatypes 文档和标准数据类型

What is probably makes more sense to do is just add a comment to the relevant properties that their values should be specified as numbers in some particular unit. 可能更有意义的是,只需在相关属性中添加注释,即应将其值指定为某个特定单位中的数字。 Eg, 例如,

prop:hasYieldStrength rdfs:comment "YieldStrength of material in Pascals"@en .

Structured values (perhaps using rdf:value ) 结构化值(可能使用rdf:value

The other option is to make the range of those properties some sort of entity that specifies both the measurement and the unit, so that your data would be like: 另一个选项是使这些属性的范围成为指定度量和单位的某种实体,以便您的数据如下:

:AlMg3 prop:hasTensileStrength [ rdf:value "300"^^xsd:integer ;
                                 unit:units unit:megaPascal ] .

If you're working in OWL, I'm not sure whether it's OK to use rdf:value or not, but you can certainly use your own vocabulary to do the same thing. 如果你在OWL工作,我不确定是否可以使用rdf:value ,但你当然可以使用自己的词汇来做同样的事情。 If you can use rdf:value , this is actually one the ways that the the RDF documentation says it can be used: 如果你可以使用rdf:value ,这实际上就是RDF文档说它可以使用的方式:

5.4.3 rdf:value 5.4.3 rdf:值

rdf:value is an instance of rdf:Property that may be used in describing structured values. rdf:value是rdf:Property的一个实例,可用于描述结构化值。

rdf:value has no meaning on its own. rdf:value本身没有任何意义。 It is provided as a piece of vocabulary that may be used in idioms such as illustrated in example 16 of the RDF primer [RDF-PRIMER]. 它作为一个词汇表提供,可用于成语,例如RDF引物[RDF-PRIMER]的例16中所示。 Despite the lack of formal specification of the meaning of this property, there is value in defining it to encourage the use of a common idiom in examples of this kind. 尽管缺乏对该属性含义的正式说明,但定义它以鼓励在这种示例中使用共同的习语是有价值的。

The RDF Primer has relevant material too; RDF Primer也有相关材料; measurements are one of the explicit examples: 测量是一个明确的例子:

4.4 More on Structured Values: rdf:value 4.4有关结构化值的更多信息:rdf:value

… For instance, in Example 9 in Section 3.2, the weight of a particular tent was given as the decimal value 2.4 using a typed literal, ie, ...例如,在3.2节的例9中,使用类型文字给出了特定帐篷的权重作为十进制值2.4,即

 exproduct:item10245 exterms:weight "2.4"^^xsd:decimal . 

In fact, a more complete description of the weight would have been 2.4 kilograms rather than just the decimal value 2.4. 事实上,更完整的重量描述将是2.4千克,而不仅仅是小数值2.4。 To state this, the value of the exterms:weight property would need to have two components, the typed literal for the decimal value and an indication of the unit of measure (kilograms). 为了说明这一点,exterms:weight属性的值需要有两个组件,十进制值的类型文字和度量单位的指示(千克)。 In this situation the decimal value could be considered the "main" value of the exterms:weight property, because frequently the value would be recorded simply as the typed literal (as in the triple above), relying on an understanding of the context to fill in the unstated units information. 在这种情况下,十进制值可以被认为是exterms:weight属性的“主要”值,因为通常该值将被简单地记录为类型文字(如上面的三元组),依赖于对上下文的理解来填充在未说明的单位信息。

In the RDF model a qualified property value of this kind can be considered as simply another kind of structured value. 在RDF模型中,这种合格的属性值可以被视为另一种结构化值。 To represent this, a separate resource could be used to represent the structured value as a whole (the weight, in this case), and to serve as the object of the original statement. 为了表示这一点,可以使用单独的资源来表示整个结构化值(在这种情况下为权重),并用作原始语句的对象。 That resource could then be given properties representing the individual parts of the structured value. 然后可以为该资源提供表示结构化值的各个部分的属性。 In this case, there should be a property for the typed literal representing the decimal value, and a property for the unit. 在这种情况下,应该有一个表示十进制值的类型文字的属性,以及该单元的属性。 RDF provides a predefined rdf:value property to describe the main value (if there is one) of a structured value. RDF提供预定义的rdf:value属性来描述结构化值的主值(如果有的话)。 So in this case, the typed literal could be given as the value of the rdf:value property, and the resource exunits:kilograms as the value of an exterms:units property (assuming the resource exunits:kilograms is defined as part of example.org's vocabulary). 因此,在这种情况下,类型文字可以作为rdf:value属性的值给出,资源exunits:千克作为exterms:units属性的值(假设资源exunits:千克被定义为示例的一部分。组织的词汇)。 The resulting triples would be: 由此产生的三元组将是:

 exproduct:item10245 exterms:weight _:weight10245 . _:weight10245 rdf:value "2.4"^^xsd:decimal . _:weight10245 exterms:units exunits:kilograms . 

Note that that last example can be written as: 请注意,最后一个示例可以写为:

exproduct:item10245 exterms:weight [ rdf:value "2.4"^^xsd:decimal ;
                                     exterms:units exunits:kilograms ] .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM