CLEA1500

From UNL Wiki
(Difference between revisions)
Jump to: navigation, search
(Recommended Readings)
 
(30 intermediate revisions by one user not shown)
Line 1: Line 1:
CLEA1500 certifies that you have reached a standard of knowledge concerning the development of natural language grammars for [[UNLization]] and may officially participate in the UNL Research. The certificate consists of a set of 100 sentences that must be UNLized with IAN.
+
CLEA<sup>1500</sup> certifies that you have reached a standard of knowledge concerning the development of natural language grammars for [[UNLization]] and may officially participate in the UNL Research. The certificate consists of a set of 50 sentences that must be UNLized with IAN.
  
 
== Goal ==
 
== Goal ==
In CLEA1500, you are expected to provide the lingware (dictionary and grammars) necessary to UNLize a translated version of [[UCA1]].
+
In CLEA<sup>1500</sup>, you are expected to provide the lingware (dictionary and grammars) necessary to '''UNLize''' a translated version of [[UCA1]].
  
 
== Instructions ==
 
== Instructions ==
Corpus
+
#Training corpus
#Translate (manually) the sentences of the corpus [[UCA1]] from English into your native language. Be as close as possible to the original, and provide one single translation for each sentence. This will be your input document file, and your goal will be to provide (automatically, through [[IAN]]) the UNL graphs for each sentence
+
##Prepare the training corpus
 +
##*<u>If your native language is not English</u>: translate (manually) the 50 sentences of the corpus [[UCA1]] from English into your native language. Be as close as possible to the original, and provide one single translation for each sentence. This will be your input document file, and your goal will be to provide (automatically, through [[IAN]]) the UNL graphs for each sentence. See an example of input file [http://www.unlweb.net/resources/UCA1/uca1_fra.txt here].
 +
##*<u>If your native language is English</u>: use the corpus [[UCA2]] as your input document file.
 
##Save the translated text (without the English original) in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>NL FILES.  
 
##Save the translated text (without the English original) in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>NL FILES.  
#Dictionary
+
#Dictionary<ref>Instead of creating a whole new dictionary from scratch, you may try localizing the English dictionary available at [http://www.unlweb.net/resources/UCA1/eng_unl_dic.txt eng_unl_dic.txt]. Note that "localization" is not the same as "translation". You may need other features (in English, for instance, nouns do not have gender or case) or other entries. In any case, the resulting dictionary should reflect your translated version of the corpus (i.e., all entries appearing in your translated version of the corpus should appear in the dictionary). For further information on localization, see [[Localization]]. For information on the dictionary structure, see [[Dictonary Specs]]. For an explanation of the structure of the English dictionary, see [[English_dictionary|English Dictionary]]. In case you need additional features, use only the tags available at the [[tagset]].</ref>
##Localize the dictionary available at [http://www.unlweb.net/resources/dic/UCA1/eng_unl_dic.txt eng_unl_dic.txt]. Note that "localization" is not the same as "translation". You may need other features (in English, for instance, nouns do not have gender or case) or other entries. In any case, the resulting dictionary should fit your translated version of the corpus (i.e., all the entries appearing in your translated version of the corpus should appear in the dictionary). For further information on localization, see [[Localization]]. For information on the dictionary structure, see [[Dictionary Specs]]. For an explanation of the structure of the English dictionary, see [[English_dictionary|English Dictionary]]. In case you need additional features, use only the tags available at the [[tagset]].  
+
##Create a dictionary for your training corpus. Your dictionary must contain <u>all and only the word forms appearing in your training corpus</u>, and must comply with the [[Dictionary Specs]].
 
##Save the NL-UNL dictionary in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>DICTIONARIES.
 
##Save the NL-UNL dictionary in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>DICTIONARIES.
##Upload the [http://www.unlweb.net/resources/dic/default_dic.txt Default Dictionary] to UNLWEB>UNLDEV>IAN>DICTIONARIES.
+
#Grammars<ref>In order to prepare the grammar, study the [[Grammar Specs]]. Next, take a look at the structure of the [[English_grammar|English Grammar]] for a detailed example. In many cases, it is simpler just to localize the English grammars to your own locale rather than creating a whole grammar from the scratch. See the instructions at [[Localization]].</ref>
#Grammar
+
##Create the NL-UNL (analysis) grammars necessary to UNLize the natural language sentences of the translated corpus. These grammars are the most difficult (and the actual goal) of the whole analysis task. There can be three different types of grammar:
##Create the NL-UNL (analysis) transformation grammar necessary to analyze, in UNL, the natural language sentences of the translated corpus. This grammar is the most difficult (and the actual goal) of the whole analysis task. In order to prepare the grammar, study the [[Grammar Specs]]. Next, take a look at the structure of the [[English_grammar|English Grammar]] for a detailed example. Note that the English Grammar is actually made of three different sub-grammars: the [[Standardization grammar]], the English Grammar itself, and the [[Default grammar]]. In many cases, it is simpler just to localize the English grammar to your own locale rather than creating a whole grammar from the scratch. See the instructions at [[Localization]]. The Standardization Grammar and the Default Grammar are supposed to be language-independent, and you may simply use them "as is", i.e., without any change. The grammar is normally developed inside IAN, because we have to test it every time. But you may also prepare a draft grammar, save it in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>T-RULES.  
+
##*[[N-grammar]], which is used to segment<ref>This is not necessary, because the corpus is already segmented.</ref> the text into sentences and to normalize the input text, resolving contractions, abbreviations and other phenomena that can be handled without the dictionary (i.e., by manipulating isolated strings of characters);
##Create the NL-UNL (analysis) disambiguation grammar in order to improve the results of the transformation and to control the process of tokenization. Again, this  grammar is normally developed inside IAN (at the D-RULES tab), because we have to test it every time. Consult the [[English_grammar|English Grammar]] for a detailed example of a disambiguation grammar.
+
##*[[T-grammar]], which is used to transform the list structure (i.e., the natural language sentence) into a graph structure (the UNL graph);
##Test the grammar against the corpus and provide the necessary changes.
+
##*[[D-grammar]], which is used to improve the performance of the [[tokenization]] and of the [[transformation]].<ref>D-rules used in tokenization are used either to prevent wrong lexical matches or to provoke right lexical matches. D-rules used in transformation are used to either prevent or provoke the application of certain rules.</ref>
 
+
##Save the NL-UNL grammars in a plain text (.txt) file with UTF-8 encoding and upload them to the corresponding tabs in UNLWEB>UNLDEV>IAN.
== Assessment ==
+
##Test them and do the necessary changes until you get good results.
The actual output must be evaluated against the expected outputs using the [[F-Measure]], which can be automatically calcuated at UNLWEB>UNLARIUM>TOOLS>F-MEASURE
+
#Evaluation
In order to obtain the F-measure you will have to provide the following files:
+
##Export the actual output of IAN (range=1-100, trace-level=NONE).
*Actual output: the output provided by IAN, in your language, with the resources that you have provided, for the translated version of UCA1
+
##Check the F-measure of the actual output at UNLWEB>UNLARIUM>TOOLS>F-MEASURE.<ref>The F-measure compares the actual output (exported from IAN) with the expected output (available at [http://www.unlweb.net/resources/UCA1/uca1_unl.txt uca1_unl.txt])</ref>
*Expected output: [http://www.unlweb.net/resources/corpus/UCA1/UCA1_unl.txt UC-A1 in UNL]
+
##If the F-measure > 0.9, upload the corpus, dictionary and grammars to VALERIE (UNLWEB>VALERIE>CLEA1500) in order to have your exercise evaluated.
  
 
== Samples and Examples ==
 
== Samples and Examples ==
Line 29: Line 31:
 
!Language
 
!Language
 
!Corpus
 
!Corpus
!Dictionary<ref>Two dictionaries are necessary for each language: the language-specific dictionary, and the [[Default Dictionary]], which contains language-independent entries, such as punctuation signs and regular expressions. The default dictionary must be loaded after the language-specific dictionary.</ref>
+
!Dictionary
!T-Grammar<ref>Three t-grammars are necessary for each language: the [[Standardization grammar]], the language-specific grammar, and the [[Default grammar]]. The standardization grammar and the default grammar are language-independent. The grammars must be loaded in this order: 1) standardization, 2) language-specific, and 3) default. </ref>
+
!N-Grammar
 +
!T-Grammar
 
!D-Grammar
 
!D-Grammar
 
!Output
 
!Output
 
|-
 
|-
 
|align=center|English
 
|align=center|English
|[http://www.unlweb.net/resources/corpus/UCA1/UCA1_eng.txt UC-A1 in English]
+
|[http://www.unlweb.net/resources/UCA1/uca1_eng.txt uca1_eng.txt]
|[http://www.unlweb.net/resources/dic/UCA1/eng_unl_dic.txt ENG-UNL Dictionary]<br />[http://www.unlweb.net/resources/dic/default_dic.txt Default Dictionary]
+
|[http://www.unlweb.net/resources/UCA1/eng_unl_dic.txt eng_unl_dic.txt]
|[http://www.unlweb.net/resources/grammar/s-grammar.txt Standardization Grammar]<br />
+
|[http://www.unlweb.net/resources/UCA1/eng_unl_ngrammar.txt eng_unl_ngrammar.txt]
[http://www.unlweb.net/resources/grammar/UCA1/eng_unl_tgrammar.txt ENG-UNL T-Grammar]<br />
+
|[http://www.unlweb.net/resources/UCA1/eng_unl_tgrammar.txt eng_unl_tgrammar.txt]
[http://www.unlweb.net/resources/grammar/nl_unl_tgrammar.txt Default T-Grammar]
+
|[http://www.unlweb.net/resources/UCA1/eng_unl_dgrammar.txt eng_unl_dgrammar.txt]
|[http://www.unlweb.net/resources/grammar/UCA1/eng_unl_dgrammar.txt ENG-UNL D-Grammar]
+
|[http://www.unlweb.net/resources/UCA1/eng_unl_trace.txt eng_unl_trace.txt]
|[http://www.unlweb.net/resources/output/UCA1/eng_unl.txt ENG>UNL]
+
 
|}
 
|}
 
<br />
 
<br />
 
  
 
== Recommended Readings ==
 
== Recommended Readings ==
Line 51: Line 52:
 
*[[UNL Dictionary Specs]], which is essential to understand the dictionary structure
 
*[[UNL Dictionary Specs]], which is essential to understand the dictionary structure
 
*[[UNL Grammar Specs]], which is essential to understand the grammar structure
 
*[[UNL Grammar Specs]], which is essential to understand the grammar structure
*[[X-bar]]
 
*[[Default Dictionary]]
 
*[[English dictionary]]
 
*[[Default grammar]]
 
*[[English grammar]]
 
 
It is also interesting to make a test drive with [[IAN]].
 
It is also interesting to make a test drive with [[IAN]].
  
 
== Notes ==
 
== Notes ==
 
<references/>
 
<references/>

Latest revision as of 16:22, 7 August 2014

CLEA1500 certifies that you have reached a standard of knowledge concerning the development of natural language grammars for UNLization and may officially participate in the UNL Research. The certificate consists of a set of 50 sentences that must be UNLized with IAN.

Contents

Goal

In CLEA1500, you are expected to provide the lingware (dictionary and grammars) necessary to UNLize a translated version of UCA1.

Instructions

  1. Training corpus
    1. Prepare the training corpus
      • If your native language is not English: translate (manually) the 50 sentences of the corpus UCA1 from English into your native language. Be as close as possible to the original, and provide one single translation for each sentence. This will be your input document file, and your goal will be to provide (automatically, through IAN) the UNL graphs for each sentence. See an example of input file here.
      • If your native language is English: use the corpus UCA2 as your input document file.
    2. Save the translated text (without the English original) in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>NL FILES.
  2. Dictionary[1]
    1. Create a dictionary for your training corpus. Your dictionary must contain all and only the word forms appearing in your training corpus, and must comply with the Dictionary Specs.
    2. Save the NL-UNL dictionary in a plain text (.txt) file with UTF-8 encoding and upload it to UNLWEB>UNLDEV>IAN>DICTIONARIES.
  3. Grammars[2]
    1. Create the NL-UNL (analysis) grammars necessary to UNLize the natural language sentences of the translated corpus. These grammars are the most difficult (and the actual goal) of the whole analysis task. There can be three different types of grammar:
      • N-grammar, which is used to segment[3] the text into sentences and to normalize the input text, resolving contractions, abbreviations and other phenomena that can be handled without the dictionary (i.e., by manipulating isolated strings of characters);
      • T-grammar, which is used to transform the list structure (i.e., the natural language sentence) into a graph structure (the UNL graph);
      • D-grammar, which is used to improve the performance of the tokenization and of the transformation.[4]
    2. Save the NL-UNL grammars in a plain text (.txt) file with UTF-8 encoding and upload them to the corresponding tabs in UNLWEB>UNLDEV>IAN.
    3. Test them and do the necessary changes until you get good results.
  4. Evaluation
    1. Export the actual output of IAN (range=1-100, trace-level=NONE).
    2. Check the F-measure of the actual output at UNLWEB>UNLARIUM>TOOLS>F-MEASURE.[5]
    3. If the F-measure > 0.9, upload the corpus, dictionary and grammars to VALERIE (UNLWEB>VALERIE>CLEA1500) in order to have your exercise evaluated.

Samples and Examples

The following resources have been used to deal with UCA1 in English and may be used as a sample of what is expected to be provided

UNLization
Language Corpus Dictionary N-Grammar T-Grammar D-Grammar Output
English uca1_eng.txt eng_unl_dic.txt eng_unl_ngrammar.txt eng_unl_tgrammar.txt eng_unl_dgrammar.txt eng_unl_trace.txt


Recommended Readings

Before starting the activity, and in order to fully understand what is expected to be done, it is important for you to be acquainted with the following documentation:

  • Tagset, because you are expected to use only the tags included in the tagset
  • UNL Dictionary Specs, which is essential to understand the dictionary structure
  • UNL Grammar Specs, which is essential to understand the grammar structure

It is also interesting to make a test drive with IAN.

Notes

  1. Instead of creating a whole new dictionary from scratch, you may try localizing the English dictionary available at eng_unl_dic.txt. Note that "localization" is not the same as "translation". You may need other features (in English, for instance, nouns do not have gender or case) or other entries. In any case, the resulting dictionary should reflect your translated version of the corpus (i.e., all entries appearing in your translated version of the corpus should appear in the dictionary). For further information on localization, see Localization. For information on the dictionary structure, see Dictonary Specs. For an explanation of the structure of the English dictionary, see English Dictionary. In case you need additional features, use only the tags available at the tagset.
  2. In order to prepare the grammar, study the Grammar Specs. Next, take a look at the structure of the English Grammar for a detailed example. In many cases, it is simpler just to localize the English grammars to your own locale rather than creating a whole grammar from the scratch. See the instructions at Localization.
  3. This is not necessary, because the corpus is already segmented.
  4. D-rules used in tokenization are used either to prevent wrong lexical matches or to provoke right lexical matches. D-rules used in transformation are used to either prevent or provoke the application of certain rules.
  5. The F-measure compares the actual output (exported from IAN) with the expected output (available at uca1_unl.txt)
Software