UNL document

From UNL Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
UNL documents are documents written in UNL. They are plain text files that include [[UNL Sentences]] and some special tags. They are the output of the [[enconversion]] process and the input of the [[deconversion]] process.  
+
'''UNL documents''' are documents written in UNL. They are plain text files that include [[UNL Sentences]] and some special tags. They are the output of the [[enconversion]] process and the input of the [[deconversion]] process.  
  
 
== Syntax ==
 
== Syntax ==

Revision as of 15:28, 16 April 2009

UNL documents are documents written in UNL. They are plain text files that include UNL Sentences and some special tags. They are the output of the enconversion process and the input of the deconversion process.

Syntax

A UNL document is enclosed with tags “[D:<dinf>]” and “[/D]”. Within these tags, each paragraph is enclosed with a pair of tags “[P:<p_num>]” and “[/P]”, and each sentence is enclosed with a pair of tags “[S:<s_num>]” and “[/S]”. Inside a sentence, the text of original sentence is enclosed with “{org:<l_tag>}” and “{/org}”, its UNL expression is enclosed with “{unl:<uinf>}” and “{/unl}”. Sentences of target languages can also be stored in the UNL document. Each target sentence is enclosed with a pair of language tags “{<l_tag>}” and “{</l_tag>}” following the UNL expression of each sentence.

Tags used in UNL Documents

Tag Description
[D:<dinf>] indicates the beginning of a document and the necessary information about the document
[/D] indicates the end of a document
[P:<p_num>] indicates the beginning of a paragraph
[/P] indicates the end of a paragraph
[S:<s_num>] indicates the beginning of a sentence and the sentence number
[/S] indicates the end of a sentence
{org:<l_tag>=<code>} indicates the beginning of an original/source sentence, language and character code, “=<code>” can be omitted
{/org} indicates the end of an original sentence
{unl:<uinf>} indicates the beginning of the UNL expressions of a sentence and necessary information, “:<uinf>” can be omitted
{/unl} indicates the end of the UNL expressions of a sentence
{<l_tag>} indicates the beginning of a target sentence of the language indicated by <l_tag>
{/<l_tag>} indicates the end of a target sentence of the language indicated by <l_tag>
Software