Short permanent WebCite link: http://www.webcitation.org/64ewf3UTg
A general language data entry by hand does not seem to be available.
Danotation aims to be a universal user language for specifying data by hand (with a text editor) especially for log-like information such as records of expenses, personal medical events, lecture notes about some text, comments on files or arbitrary items and the like.
Danotation aims to be used by non-computer professionals. To this end it has a minimal and plain syntax. However, some syntactic provision is made for the avoidance of counterproductive repetitions.
The basic syntax is frozen, in the sense that it should never have further versions.
There is also a macro syntax that includes a number of mechanisms for reducing verbosity and adapting to various fashions of data representation.
Finally, there is a dump syntax, an ascii table form that is even easier to load into programs (such as the R statistical system) than the basic syntax, even without the need of any API or library.
Conversion from the macro to basic and dump format, and from basic to dump, as well as syntax checking is performed by the danotation utility (unix command).
1. A danotation file is sequence of records, each ending with the symbol '_'.
2. Each record contains of a sequence of pairs of symbols, that are named attributes, and values. Symbols are alphanumerical sequences that must start with a letter and may also contain any number of '_' characters.
3. Values are any strings of graphic characters. If a value starts with a double quote it must also end with a double quote and it may then contain any characters, including double quotes that are escaped with a backslash.
4. Symbols and values are sepparated by white space (spaces, tabs, line breaks).
This is all. Please see an example below.
The order in which attributes appear is usually significant. For example, the record:
person "Alexandru Corlan" phone +9021-343-3333 at home phone +9022-334-4444 at job comment "the above are imaginary phone numbers" _The first 'at' refers to the first 'phone' while the last to the last phone. However, this significance results from the behaviour of the processing programs. Still, danotation preserves the order.
1 1 PREDICATE defval 1 2 SUBJECT neuro 1 3 val 0 1 4 semn "excelent" 2 1 PREDICATE defval 2 2 SUBJECT neuro 2 3 val 1 2 4 semn "usor ametit/somnolent/etc"The first is the record number. The second is the attribute number inside the record. The third is the attribute name (two new explicit attributes are introduced, PREDICATE and SUBJECT). The last is the value. This format is easy to process with tools like awk, sed or R or loaded into spreadsheets. The above example corresponds to:
defval neuro val 0 semn "excelent" _ defval neuro val 1 semn "usor ametit/somnolent/etc" _
The name of an attribute may be PREDICATE or SUBJECT. This is to be used in conjunction with tables (see below).
It is active until the next table_head or the end of the file.
Your comments are highly welcome, please enter them here.
Download from here:
Installation and use are unchanged from version 0.6 (except that you need to use '7' instead of '6').
tar xvzf danotation_0.6.tar.gz cd danotation_0.6 make sudo make install
tar xvzf danotation_0.6_bin.tar.gz cd danotation_0.6_bin sudo make install
cd danotation_0.6 sudo make uninstall
Danotation V0.5, January 12, 2012
man danotation man 5 danotation danotation -i|--interpretstdout danotation [-d|--dump] [-h|--header] {-p|--predicate }* {-s|--subject }* {-eq|--equals }* * stdout
The first form (interpret) reads the macro syntax on the standard input and produces the base syntax on the standard output.
The second form reads the basic syntax on the standard input and produces either the dump format or a table with attribute values, one record per line, on the standard output. In the latter case, it can be easily combined with xargs and printf to produce reports in a variety of formats.
A selection of the records to dump or tabulate may be done by specifying predicates, subjects and attribute values. Repeated specifications of the same type are considered to be combined with 'or' while specification of different kinds are considered to be combined with 'and'.