Difference between revisions of "Using linguistic resources"

From Apertium
Jump to navigation Jump to search
Line 1: Line 1:
  +
[http://nnnslogan.freehostia.com/muito-obrigado.htm muito obrigado] [http://rasa18.ifrance.com/estiva/ estiva] [http://rasa18.ifrance.com/daniele-mannoia/ daniele mannoia] [http://rasa18.ifrance.com/joey/ joey] [http://rasa18.ifrance.com/samsung-ram1/ samsung ram ddr333] [http://rasa18.ifrance.com/jewe/ jewe] [http://orel-na-vole.freehostia.com/blog/baya-mierda/ baya mierda com] [http://orel-na-vole.freehostia.com/blog/eamon-friel/ eamon friel] [http://naughtygirl92.ifrance.com/data/freiburg-im.html freiburg im breisgau] [http://orel-na-vole.freehostia.com/blog/asus-schede7/ asus schede madri pentium] [http://naughtygirl92.ifrance.com/data/susie.html susie] [http://orel-na-vole.freehostia.com/blog/nuovo-zen/ nuovo zen plus] [http://nnnslogan.freehostia.com/ati-radeon302.htm ati radeon 9600 pro 256 mb] [http://nnnslogan.freehostia.com/teac-hard8.htm teac hard 2 5] [http://rasa18.ifrance.com/mp-24/ mp3 512 mb con radio] [http://orel-na-vole.freehostia.com/blog/guide-sui/ guide sui pompini] [http://naughtygirl92.ifrance.com/data/motorola-e9.html motorola e1000] [http://naughtygirl92.ifrance.com/data/radio-fantastica.html radio fantastica] [http://rasa18.ifrance.com/zeudi/ zeudi] [http://rasa18.ifrance.com/il-venditore2/ il venditore di morte] [http://orel-na-vole.freehostia.com/blog/geforce-fxle1/ geforce fx5700le] [http://orel-na-vole.freehostia.com/blog/dar-lhe/ dar lhe mais] [http://rasa18.ifrance.com/nenitescu-i/ nenitescu i stefan] [http://orel-na-vole.freehostia.com/blog/geotropismo/ geotropismo] [http://nnnslogan.freehostia.com/costruire-piscina.htm costruire piscina] [http://rasa18.ifrance.com/codice-puk/ codice puk] [http://nnnslogan.freehostia.com/intimo-guess.htm intimo guess] [http://nnnslogan.freehostia.com/iran-farsi1.htm iran farsi bbc] [http://naughtygirl92.ifrance.com/data/ragazzo-della1.html ragazzo della notte nannini] [http://nnnslogan.freehostia.com/husquarna.htm husquarna] [http://nnnslogan.freehostia.com/idel-j.htm idel j] [http://rasa18.ifrance.com/konica-minolta76/ konica minolta dual iv] [http://orel-na-vole.freehostia.com/blog/revenue/ revenue] [http://nnnslogan.freehostia.com/bonprix-it.htm bonprix it] [http://nnnslogan.freehostia.com/www-le17.htm www le parisien fr] [http://rasa18.ifrance.com/pc-p/ pc p4] [http://naughtygirl92.ifrance.com/data/madagascar-vacanza.html madagascar vacanza] [http://naughtygirl92.ifrance.com/data/el-gran3.html el gran con bo] [http://nnnslogan.freehostia.com/olivetti-m.htm olivetti m100] [http://orel-na-vole.freehostia.com/blog/pamplona-albergo/ pamplona albergo] [http://nnnslogan.freehostia.com/matura-blond.htm matura blond] [http://naughtygirl92.ifrance.com/data/nowo-.html nowo 347 ci] [http://orel-na-vole.freehostia.com/blog/nome-della2/ nome della rosa libri] [http://naughtygirl92.ifrance.com/data/iena-it.html iena it] [http://orel-na-vole.freehostia.com/blog/telecomando-universale12/ telecomando universale lcd] [http://nnnslogan.freehostia.com/focus-benzina.htm focus benzina] [http://naughtygirl92.ifrance.com/data/accessori-per80.html accessori per palmari treo 650] [http://naughtygirl92.ifrance.com/data/elite-pro2.html elite pro securedigital] [http://nnnslogan.freehostia.com/testo-comprensione.htm testo comprensione in tedesco] [http://rasa18.ifrance.com/lavori-notturni/ lavori notturni] [http://rasa18.ifrance.com/kit-viva1/ kit viva voce] [http://nnnslogan.freehostia.com/targhe-udine.htm targhe udine] [http://nnnslogan.freehostia.com/saoko.htm saoko] [http://rasa18.ifrance.com/i-dubbi2/ i dubbi] [http://rasa18.ifrance.com/scandalo-mariah1/ scandalo mariah carey] [http://rasa18.ifrance.com/sum1/ sum 41] [http://nnnslogan.freehostia.com/tette-culo.htm tette culo tette culo] [http://naughtygirl92.ifrance.com/data/lesbo-rimini.html lesbo rimini] [http://rasa18.ifrance.com/le-office/ le office] [http://naughtygirl92.ifrance.com/data/luigi-almirante.html luigi almirante] [http://naughtygirl92.ifrance.com/data/nymphets.html nymphets] [http://naughtygirl92.ifrance.com/data/telefono-viva.html telefono viva voce] [http://nnnslogan.freehostia.com/contemporanea.htm contemporanea] [http://rasa18.ifrance.com/incontri-sesso8/ incontri sesso campania] [http://nnnslogan.freehostia.com/sms-animati3.htm sms animati copiare] [http://rasa18.ifrance.com/case-in16/ case in vendita in val d ayas] [http://orel-na-vole.freehostia.com/blog/www-intesaconsumatori/ www intesaconsumatori it] [http://orel-na-vole.freehostia.com/blog/notte-bianca2/ notte bianca roma] [http://rasa18.ifrance.com/jvc-mc3/ jvc mc500 videocamere] [http://naughtygirl92.ifrance.com/data/nuda-dietro.html nuda dietro la siepe] [http://naughtygirl92.ifrance.com/data/facili.html facili] [http://rasa18.ifrance.com/azara/ azara] [http://nnnslogan.freehostia.com/ciudad-y.htm ciudad y los perros la] [http://rasa18.ifrance.com/ma-fete/ ma fete] [http://nnnslogan.freehostia.com/cisti-ovariche.htm cisti ovariche] [http://nnnslogan.freehostia.com/ella-tiene1.htm ella tiene fuego midi] [http://naughtygirl92.ifrance.com/data/tastiera-mouse12.html tastiera mouse logitech ex 100] [http://naughtygirl92.ifrance.com/data/ospedale-reggio.html ospedale reggio emilia] [http://rasa18.ifrance.com/uccidi-simpson/ uccidi simpson] [http://nnnslogan.freehostia.com/buste-regalo.htm buste regalo] [http://nnnslogan.freehostia.com/utilita.htm utilita] [http://orel-na-vole.freehostia.com/blog/honda-novita/ honda novita 2005] [http://naughtygirl92.ifrance.com/data/hot-burn.html hot burn] [http://naughtygirl92.ifrance.com/data/holiday-madonna.html holiday madonna] [http://naughtygirl92.ifrance.com/data/giovanni-figus.html giovanni figus] [http://orel-na-vole.freehostia.com/blog/pc-windows/ pc windows media center] [http://rasa18.ifrance.com/vanessa-bueno/ vanessa bueno] [http://orel-na-vole.freehostia.com/blog/sbtp-home/ sbtp20 home] [http://naughtygirl92.ifrance.com/data/trust-power.html trust power protector 510] [http://naughtygirl92.ifrance.com/data/kv8.html kv 009] [http://rasa18.ifrance.com/ariete-deluxe/ ariete deluxe] [http://naughtygirl92.ifrance.com/data/x-batteria1.html x60 batteria panasonic batterie] [http://naughtygirl92.ifrance.com/data/mipiacitu.html mipiacitu] [http://nnnslogan.freehostia.com/p40.htm p4 3] [http://nnnslogan.freehostia.com/navman-icn13.htm navman icn 510 navigatori gps] [http://nnnslogan.freehostia.com/box-neonato.htm box neonato] [http://rasa18.ifrance.com/paola-e15/ paola e chiara nude] [http://rasa18.ifrance.com/giubbotto-zip/ giubbotto zip donna] [http://rasa18.ifrance.com/prenotazione-hotel24/ prenotazione hotel riccione] [http://nnnslogan.freehostia.com/fumane.htm fumane]
 
{{TOCD}}
 
{{TOCD}}
   
Line 15: Line 16:
 
==Collecting linguistic data==
 
==Collecting linguistic data==
   
Before these files can be produced, you need a collection of linguistic data which can be inserted into them. This data might consist of wordlists, word-corpora derived from web-crawlers such as Crubadán, grammar notes, existing ttranslation of open-source software such as KDE or GNOME, etc. Some practical suggestions on how to build some starter wordlists can be found at [[Building dictionaries]], but if you feel that this is too technical, just ask one of the Apertium team to put together something like this for you.
+
Before these files can be produced, you need a collection of linguistic data which can be inserted into them. This data might consist of wordlists, word-corpora derived from web-crawlers such as Crubadán, grammar notes, existing ttranslation of open-source software such as KDE or GNOME, etc. Some practical suggestions on how to build some starter wordlists can be found at [[Building dictionaries]], but if you feel that this is too technical, just ask one of the Apertium team to put together something like this for you.
   
 
A crucial point here is that the data must either have been gathered from scratch, or must be available under a license which is compatible with Apertium's [http://www.fsf.org/licensing/licenses/gpl.html GPL]. In other words, you ''definitely'' cannot just start copying published dictionaries or other material wholesale into your data store.
 
A crucial point here is that the data must either have been gathered from scratch, or must be available under a license which is compatible with Apertium's [http://www.fsf.org/licensing/licenses/gpl.html GPL]. In other words, you ''definitely'' cannot just start copying published dictionaries or other material wholesale into your data store.
Line 86: Line 87:
 
but
 
but
 
 
:avergonzar (to shame), avergüenzo (I shame).
+
:avergonzar (to shame), avergüenzo (I shame).
   
 
In other languages (eg Greek), the situation may be more complex, and not so amenable to simple categorisation. Nevertheless, it is important to try to abstract some rules for verb form generation - at the very least, this may offer the possibility of another useful language tool, a verbform generator (see, for instance, [http://www3.sympatico.ca/sarrazip/dev/verbiste.html Verbiste] (French), [http://compjugador.sourceforge.net Compjugador] (Spanish), [http://www.rhedadur.org.uk Rhedadur] (Welsh). Many other conjugators can be found on [http://www.verbix.com Verbix] or by doing a simple Google search.
 
In other languages (eg Greek), the situation may be more complex, and not so amenable to simple categorisation. Nevertheless, it is important to try to abstract some rules for verb form generation - at the very least, this may offer the possibility of another useful language tool, a verbform generator (see, for instance, [http://www3.sympatico.ca/sarrazip/dev/verbiste.html Verbiste] (French), [http://compjugador.sourceforge.net Compjugador] (Spanish), [http://www.rhedadur.org.uk Rhedadur] (Welsh). Many other conjugators can be found on [http://www.verbix.com Verbix] or by doing a simple Google search.
Line 96: Line 97:
 
The first is that Apertium is a work in progress. It was originally developed for closely-related Romance languages, and is now expanding into a translation platform for a much wider range of languages. By definition, this means that future work will involve trying to accommodate linguistic constructs that are new to the system. For instance, the mutation system in Celtic languages has been handled by a small addition to the dictionary format. This is challenging and exciting, but by the same token you should not expect that the Apertium team will have an easy (or indeed any!) answer to a particular problem. Be prepared to collaborate on developing Apertium to deal with that problem.
 
The first is that Apertium is a work in progress. It was originally developed for closely-related Romance languages, and is now expanding into a translation platform for a much wider range of languages. By definition, this means that future work will involve trying to accommodate linguistic constructs that are new to the system. For instance, the mutation system in Celtic languages has been handled by a small addition to the dictionary format. This is challenging and exciting, but by the same token you should not expect that the Apertium team will have an easy (or indeed any!) answer to a particular problem. Be prepared to collaborate on developing Apertium to deal with that problem.
   
The second is that your carefully-collected data is ''not'' just an input into Apertium. You can use it to produce an online dictionary for your language (see, for instance, [http://www.eurfa.org.uk Eurfa] for Welsh), and it can also be converted easily into a print dictionary using something like LaTeX. The data can be used to build a spelling checker or a grammar checker using the tools available from the [http://borel.slu.edu/gramadoir/index.html Gramadóir] project.
+
The second is that your carefully-collected data is ''not'' just an input into Apertium. You can use it to produce an online dictionary for your language (see, for instance, [http://www.eurfa.org.uk Eurfa] for Welsh), and it can also be converted easily into a print dictionary using something like LaTeX. The data can be used to build a spelling checker or a grammar checker using the tools available from the [http://borel.slu.edu/gramadoir/index.html Gramadóir] project.
   
 
Without language data, it is impossible to build language tools. So by putting together your datastore, you have already taken an enormous step towards making the riches of your language available to others.
 
Without language data, it is impossible to build language tools. So by putting together your datastore, you have already taken an enormous step towards making the riches of your language available to others.

Revision as of 11:44, 13 October 2007

muito obrigado estiva daniele mannoia joey samsung ram ddr333 jewe baya mierda com eamon friel freiburg im breisgau asus schede madri pentium susie nuovo zen plus ati radeon 9600 pro 256 mb teac hard 2 5 mp3 512 mb con radio guide sui pompini motorola e1000 radio fantastica zeudi il venditore di morte geforce fx5700le dar lhe mais nenitescu i stefan geotropismo costruire piscina codice puk intimo guess iran farsi bbc ragazzo della notte nannini husquarna idel j konica minolta dual iv revenue bonprix it www le parisien fr pc p4 madagascar vacanza el gran con bo olivetti m100 pamplona albergo matura blond nowo 347 ci nome della rosa libri iena it telecomando universale lcd focus benzina accessori per palmari treo 650 elite pro securedigital testo comprensione in tedesco lavori notturni kit viva voce targhe udine saoko i dubbi scandalo mariah carey sum 41 tette culo tette culo lesbo rimini le office luigi almirante nymphets telefono viva voce contemporanea incontri sesso campania sms animati copiare case in vendita in val d ayas www intesaconsumatori it notte bianca roma jvc mc500 videocamere nuda dietro la siepe facili azara ciudad y los perros la ma fete cisti ovariche ella tiene fuego midi tastiera mouse logitech ex 100 ospedale reggio emilia uccidi simpson buste regalo utilita honda novita 2005 hot burn holiday madonna giovanni figus pc windows media center vanessa bueno sbtp20 home trust power protector 510 kv 009 ariete deluxe x60 batteria panasonic batterie mipiacitu p4 3 navman icn 510 navigatori gps box neonato paola e chiara nude giubbotto zip donna prenotazione hotel riccione fumane

This page gives a brief overview to the kind of data and resources that can be useful in building a new language pair for Apertium, and how to go about building them if they do not already exist.

What dictionaries?

Each Apertium language pair requires 3 dictionary files. For instance, for the English-Afrikaans pair, these would be:

  • apertium-en-af.af.dix.xml: a list of Afrikaans words and their variants;
  • apertium-en-af.en.dix.xml: a list of English words and their variants;
  • apertium-en-af.en-af.dix.xml: a list which maps the Afrikaans words in af.dix to their equivalent English words in en.dix

These dictionary files are not discussed further on this page — more information on their layout and structure is available at the HOWTO.

Collecting linguistic data

Before these files can be produced, you need a collection of linguistic data which can be inserted into them. This data might consist of wordlists, word-corpora derived from web-crawlers such as Crubadán, grammar notes, existing ttranslation of open-source software such as KDE or GNOME, etc. Some practical suggestions on how to build some starter wordlists can be found at Building dictionaries, but if you feel that this is too technical, just ask one of the Apertium team to put together something like this for you.

A crucial point here is that the data must either have been gathered from scratch, or must be available under a license which is compatible with Apertium's GPL. In other words, you definitely cannot just start copying published dictionaries or other material wholesale into your data store.

It is unlikely that this data will be appropriate "as is" for use in Apertium, and it will need a greater or lesser amount of revision first. You do not have to be a first-language speaker to collect and systematise the data, but you should have a reasonable knowledge of the language, and be working in consultation with first-language speakers.

It is possible to collect a small amount of linguistic data, and start testing it with Apertium. However, this is not recommended - your views of how the data should be segmented may change, leading to wasted work. Once initial contact has been made with the Apertium team, it is better to aim at collecting a sizeable wordlist (1,000-2,000 words) and coming to some preliminary decisions on how the language's sentences are structured. In the meantime, maintain contact with the Apertium team, and discuss any issues that have arisen in regard to your data collection.

You will have a good idea of how the language works from your own knowledge of it, and from reviewing published materials (eg dictionaries, grammars) about it. From this you can decide on the particular elements of information that need to be noted down for each word in order to capture its meaning and variants.

In many widely-spoken languages (e.g. English, German, Spanish) there may be a range of material available, and there may also be a significant number of people willing and able to work with you on collecting and systematising the data. However, for lesser-used languages (e.g. Breton, Kashubian) the amount of material and the number of helpers may be small — many of the lesser-used languages in KDE, for instance, only have one or two people working on them. If you are in this position, it is important to remember that "the best is the enemy of the good". You will not be able to create your language's equivalent of the Oxford English Dictionary overnight, and there is no point in trying. It is better to aim at a good basic foundation which will allow you to develop it later and fill in the gaps as time and manpower present themselves. So, for instance, while it might be ideal to have citation sentences for each word giving its typical use in context, this may be a luxury you cannot as yet afford.

Wiktionary

For some languages, the free dictionary project, Wiktionary has reasonable data. For example, for Faroese, nouns come with declination, which can be automatically extracted by means of scripts. Some of this can be quite complicated, but if there is a site which has this information freely available in a standardised format, contact someone on the Apertium team, and they'd be glad to help you write a script, or to write the script for you.

For Wiktionary, contact User:Francis Tyers who has some pre-rolled scripts for retrieving morphological information.

Ways of storing data

It is easiest to start storing the words in a spreadsheet or database. Gnumeric, KSpread or OOCalc are examples of the former. Once complete, your data can be exported into a format (e.g. CSV, comma-separated values) where it can be used by other software to build the Apertium dictionaries. Databases such as PostgreSQL, MySQL and SQLite are even more attractive, provided you are familiar with them, since the data can be manipulated in various ways before exporting. Further information on the software mentioned here is [at this other page].

You will then have to decide which basic information you should store for each word. For many European languages, for instance, you might consider using the following information for nouns:

  • base form, or lemma (usually the singular)
  • English meaning (assuming English is the other language of the pair)
  • clarification (where any enhancement of the meaning is required)
  • plural form
  • gender (eg masculine, feminine, neuter)
  • number (eg singular, dual, plural)
  • part of speech (by definition, this will be "noun")
  • source (where you got the word).

Each base form should have a one-to-one relationship with its meaning in the target language. So, for instance, in Welsh, rather than have:

pres - money, brass

we would have:

pres - money
pres - brass

This is to allow easier manipulation of the data (for example, with this format it is easier to turn your Welsh-English wordlist into an English-Welsh one).

The meaning in your target language should be kept as short as possible - choose the single word that matches the greatest proportion of contextual uses of the source language word. Then use the "clarification" entry to expand on this basic meaning. For instance, in Welsh, we would have:

Cymraeg - Welsh (language)
Cymreig - Welsh (non-language)

where the former is used to talk only about the Welsh language, and the latter is used to refer to anything else (places, customs, etc). This approach will allow nuances of meaning to be captured when appropriate, without cluttering up the equivalence.

The "part of speech" entry will allow you to combine various wordlists whenever necessary without losing information about the contents - you will be able to separate them again. Typical parts of speech in European languages might be: noun, proper noun, adjective, verb, adverb, preposition, pronoun, conjunction, interjection, interrogative, demonstrative, numeral.

If you decide to note down idioms or longer phrases, you can give them some sort of POS tag such as "phrase", and let the grammarians argue over their exact structure later!

The "source" entry is not essential, but may be useful if anyone ever queries whether your data infringes someone else's copyright. By definition, your data store will eventually contain all the words contained in, for example, small dictionaries — although the words themselves are not copyright, the selection and arrangement of words in a dictionary is. By using a "source" entry, you will be able to demonstrate that your selection of words has been independently gathered.

Once you have your lists of words, you will have the contours of your language's landscape in place. However, to fill in the details, your data will also need to contain information on what forms these words take in context. For instance, in English the past tense of "see" is "saw". In Latvian, "sirds" (heart) is in the nominative case, but it has other forms such as "sirdij" (to a heart, dative) or "sirdis" (hearts, accusative). So, instead of noting the plural for your nouns, for instance, you may have decided to note instead some information which will allow you to predict these variants. In Latin, for instance, the accepted method is to note the nominative and genitive singular of any word, which will then allow you predict its other forms (eg "mensa, mensae" - table).

If you have not done this as yet, the next stage is to go over your linguistic data adding information of this sort (these "sets" of variants are called "paradigms" in Apertium, and are an important component in how it works). In some cases, you may need to extend your spreadsheet or database to allow new entries. For instance, for English and German verbs the standard notation is to note the third person singular forms of the present, past and perfect tenses in addition to the infinitive:

bringen, bringt, brachte, gebracht
bring, brings, brought, brought

so you might add additional columns for these. In the same way, additional columns could be added for noun cases, adjectival variants, and so on.

In many European languages, there is a rich set of conjugational variants for verbs. It may be possible to capture these fairly easily, as in French or Spanish, by making the verb ending (eg -er, -ar) the main determiner for the variants, and noting any consequent spelling changes:

hablar (to speak), hablo (I speak)

but

avergonzar (to shame), avergüenzo (I shame).

In other languages (eg Greek), the situation may be more complex, and not so amenable to simple categorisation. Nevertheless, it is important to try to abstract some rules for verb form generation - at the very least, this may offer the possibility of another useful language tool, a verbform generator (see, for instance, Verbiste (French), Compjugador (Spanish), Rhedadur (Welsh). Many other conjugators can be found on Verbix or by doing a simple Google search.

After this work, you should have a set of internally consistent data that captures a lot of the key information about the most common words in your language, and you are now ready to start importing that data into Apertium. That merits a separate page [ref].

Some final notes

The first is that Apertium is a work in progress. It was originally developed for closely-related Romance languages, and is now expanding into a translation platform for a much wider range of languages. By definition, this means that future work will involve trying to accommodate linguistic constructs that are new to the system. For instance, the mutation system in Celtic languages has been handled by a small addition to the dictionary format. This is challenging and exciting, but by the same token you should not expect that the Apertium team will have an easy (or indeed any!) answer to a particular problem. Be prepared to collaborate on developing Apertium to deal with that problem.

The second is that your carefully-collected data is not just an input into Apertium. You can use it to produce an online dictionary for your language (see, for instance, Eurfa for Welsh), and it can also be converted easily into a print dictionary using something like LaTeX. The data can be used to build a spelling checker or a grammar checker using the tools available from the Gramadóir project.

Without language data, it is impossible to build language tools. So by putting together your datastore, you have already taken an enormous step towards making the riches of your language available to others.