[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
As far as these number types go, I don't actually see that the dictionary needs to care about the particular representation. I'm going to go into my analysis of this in my talk at Rovinj and paper that I am drafting, but in a nutshell, a dictionary deals with mathematical and scientific meaning, and can be independent of any datafile format. So if DDLm _type.contents is 'Real', the CIF-dictionary-aware application deals with whatever its particular programming framework uses to represent a 'Real'. Thus my requirement that we specify what can be interpreted as a 'Real' in the CIF file format documents somewhere.
Unlike DDLm and DDL1, DDL2 dictionaries can choose to define character regexes for all types. I would choose to interpret such data definitions as saying "*If* the datavalue is provided as a sequence of characters, this is the regex it should match".
all the best,
James.
--
Reply to: [list | sender only]
Re: [ddlm-group] How to specify syntax of a number in CIF2
- To: SIMON WESTRIP <simonwestrip@btinternet.com>, Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
- Subject: Re: [ddlm-group] How to specify syntax of a number in CIF2
- From: James Hester <jamesrhester@gmail.com>
- Date: Wed, 5 Aug 2015 15:23:42 +1000
- DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;h=mime-version:in-reply-to:references:date:message-id:subject:from:to:content-type; bh=um3TismcQcXP/vhqkM34SU0S1s1grQM3GWlh5V5npms=;b=0umxSnIM+JI0Hz6JorCMjuVe5RGa3igQlJi0a+FNHR3WU/X7HdOnXtpovWofQoi2A0CEX4ggeU4zBohoyvjjA5QxEujmx4NuQ3zCg2GMO32I8NjopBMG9U9PE8d1iO075zsVPvUujdBlDAbKH0z/RLKGwg7Am7kxSCzXFlZN0lDmtk2yndMktsEQEAr6cSSROrdSC7+bgVvCVaVulgWAhbtoJoM0aMchn3ClT1VvyznpP4vHbq6LCG5e1TDH0S1YcsdhFv10El9EzgY1+3X+/BtAtQT76/WFadkjk0ejYZZruOyVx0U8fmpifgSRKC744ZKDt6nIphNWkZAG7sjZ6Q==
- In-Reply-To: <812866017.254699.1438686352445.JavaMail.yahoo@mail.yahoo.com>
- References: <CAM+dB2dwgkB5VVdWGqX=EUfYxLSybsHFeNbyjpdE9cF0n6uB0A@mail.gmail.com><812866017.254699.1438686352445.JavaMail.yahoo@mail.yahoo.com>
Hi Simon,
Yes, we would be defining/preserving the base numeric types. A DDLm dictionary has no mechanism (currently) to specify in a machine-readable way the character syntax of a general data type (i.e. those listed in _type.contents), so the partial answer to the second part of your question is no, DDLm dictionaries do not have the freedom to extend the basic set of types. There is a mechanism for defining new types based on dREL character string transformations but I'm not across it yet.As far as these number types go, I don't actually see that the dictionary needs to care about the particular representation. I'm going to go into my analysis of this in my talk at Rovinj and paper that I am drafting, but in a nutshell, a dictionary deals with mathematical and scientific meaning, and can be independent of any datafile format. So if DDLm _type.contents is 'Real', the CIF-dictionary-aware application deals with whatever its particular programming framework uses to represent a 'Real'. Thus my requirement that we specify what can be interpreted as a 'Real' in the CIF file format documents somewhere.
On 4 August 2015 at 21:05, SIMON WESTRIP <simonwestrip@btinternet.com> wrote:
I would encourage this (especially as CIF2 supports Unicode and thus potentially widens the actual character set that could be interpreted as 'numbers'). By this we would be defining/preserving the base numeric types, while still giving a dictionary the freedom to extend/define its own numeric types according to whatever character sequences its domain prefers?CheersSimon
From: James Hester <jamesrhester@gmail.com>
To: ddlm-group <ddlm-group@iucr.org>
Sent: Tuesday, 4 August 2015, 3:12
Subject: [ddlm-group] How to specify syntax of a number in CIF2
_______________________________________________What do you think?<insert suitable delimiter-agnostic integer ENBF expressions here>A datavalue may only be interpreted as an integer if it conforms to the following syntax:<insert delimiter-agnostic CIF1 syntax expressions here>A datavalue may only be interpreted as a real number if it conforms to the following syntax:In a practical sense, software written in consultation with a dictionary is happy to specify that it expects a number when it calls an API routine to obtain a datavalue, as this knowledge is available at program writing time. So the onus is on the API routine to look at the sequence of characters that for the requested datavalue and decide if it can return something that the calling software understands as a number.(2) DDL dictionaries determine whether or not a value should be interpreted as a number (as they define the nature of a dataitem)(1) DDL dictionaries are format agnostic (i.e. they could be used to define ontologies for other file formats) - our DDLs are advanced and potentially useful to other communitiesIn making this specification, I think we should preserve the following behaviour:Dear All,The preceding discussion around possible semantic distinctions between whitespace and non-whitespace delimited strings has thrown up an unresolved semantic issue in CIF2. In a nutshell, a programmer wishing to write a number in CIF2 currently has no specification anywhere as to how that number should be presented, and neither do CIF2 readers know how to interpret strings as numbers.
In CIF1.1, the syntax description is included in the BNF, and the DDL2 system additionally permits each dictionary to specify the text syntax of the types used in that particular dictionary using _item_type_list.construct.
So I would suggest the following be inserted into "Common semantic features" in our online specs and the next edition of Vol G:
====
=====
ddlm-group mailing list
ddlm-group@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
--
T +61 (02) 9717 9907
F +61 (02) 9717 3145
M +61 (04) 0249 4148
F +61 (02) 9717 3145
M +61 (04) 0249 4148
_______________________________________________ ddlm-group mailing list ddlm-group@iucr.org http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group
Reply to: [list | sender only]
- References:
- [ddlm-group] How to specify syntax of a number in CIF2 (James Hester)
- Re: [ddlm-group] How to specify syntax of a number in CIF2 (SIMON WESTRIP)
- Prev by Date: Re: [ddlm-group] How to specify syntax of a number in CIF2
- Next by Date: Re: [ddlm-group] How to specify syntax of a number in CIF2
- Prev by thread: Re: [ddlm-group] How to specify syntax of a number in CIF2
- Next by thread: Re: [ddlm-group] How to specify syntax of a number in CIF2
- Index(es):