Discussion List Archives

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ddlm-group] How to specify syntax of a number in CIF2

  • To: Group finalising DDLm and associated dictionaries <ddlm-group@iucr.org>
  • Subject: Re: [ddlm-group] How to specify syntax of a number in CIF2
  • From: SIMON WESTRIP <simonwestrip@btinternet.com>
  • Date: Tue, 4 Aug 2015 11:05:52 +0000 (UTC)
  • DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btinternet.com; s=s2048;t=1438686547; bh=lUkoBP/ljjEyYdWiyOQ2c2JHCPGG1oUYefJRAdhBGUM=;h=Date:From:Reply-To:To:In-Reply-To:References:Subject:From:Subject;b=TwMVnstbN0Xaa7B2nAk90xjT7YOAU65zshRbLMYpKpV+6/n2gzjtMZXl3nZpVuj8PFhlvYND97NK4uczZRmt2SJ9ZwU5RQ+MIMzU5YWy9wlU93cVBexMrg1EfRvZOMHgmBVPs9J+wQNZ179ucmMYvSQLAdMBhldHV/QlNi0RdYZ0f3o27rcej7FIFL2wPMcnYpmOHEEuXAincPsvr5S5lZMW1b78Jo7lyoNY9N0pqmJuqW/6ee6WH4syo7EsrDPN6k0dOi+N1+HnRm5tH0gik9uyC9Cg0028eqZetAqY0XIyemWO58sY9ro/pRhQt4rr1u+2Hd6KOuEIC2tegIFr9g==
  • In-Reply-To: <CAM+dB2dwgkB5VVdWGqX=EUfYxLSybsHFeNbyjpdE9cF0n6uB0A@mail.gmail.com>
  • References: <CAM+dB2dwgkB5VVdWGqX=EUfYxLSybsHFeNbyjpdE9cF0n6uB0A@mail.gmail.com>
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?

Cheers

Simon


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

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.

In making this specification, I think we should preserve the following behaviour:

(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 communities
(2) DDL dictionaries determine whether or not a value should be interpreted as a number (as they define the nature of a dataitem)

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. 

So I would suggest the following be inserted into "Common semantic features" in our online specs and the next edition of Vol G:

====
A datavalue may only be interpreted as a real number if it conforms to the following syntax:

<insert delimiter-agnostic CIF1 syntax expressions here>

A datavalue may only be interpreted as an integer if it conforms to the following syntax:

<insert suitable delimiter-agnostic integer ENBF expressions here>
=====

What do you think?

James.
--
T +61 (02) 9717 9907
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


_______________________________________________
ddlm-group mailing list
ddlm-group@iucr.org
http://mailman.iucr.org/cgi-bin/mailman/listinfo/ddlm-group

Reply to: [list | sender only]
International Union of Crystallography

Scientific Union Member of the International Council for Science (admitted 1947). Member of CODATA, the ICSU Committee on Data. Member of ICSTI, the International Council for Scientific and Technical Information. Partner with UNESCO, the United Nations Educational, Scientific and Cultural Organization in the International Year of Crystallography 2014.

ICSU Scientific Freedom Policy

The IUCr observes the basic policy of non-discrimination and affirms the right and freedom of scientists to associate in international scientific activity without regard to such factors as ethnic origin, religion, citizenship, language, political stance, gender, sex or age, in accordance with the Statutes of the International Council for Science.