| 1 |
# Spanish: apertium-spa |
| 2 |
|
| 3 |
This is an Apertium monolingual language package for Spanish. What you can use this language package for: |
| 4 |
|
| 5 |
* Morphological analysis of Spanish |
| 6 |
* Morphological generation of Spanish |
| 7 |
* Part-of-speech tagging of Spanish |
| 8 |
|
| 9 |
## Requirements |
| 10 |
|
| 11 |
You will need the following software installed: |
| 12 |
|
| 13 |
* lttoolbox (>= 3.7.1) |
| 14 |
* apertium (>= 3.8.3) |
| 15 |
* vislcg3 (>= 1.3.9) |
| 16 |
|
| 17 |
If this does not make any sense, we recommend you look at: https://apertium.org |
| 18 |
|
| 19 |
## Compiling |
| 20 |
|
| 21 |
Given the requirements being installed, you should be able to just run: |
| 22 |
|
| 23 |
```console |
| 24 |
$ ./autogen.sh |
| 25 |
$ make |
| 26 |
``` |
| 27 |
|
| 28 |
If you're doing development, you don't have to install the data, you can use it directly from this directory. |
| 29 |
|
| 30 |
If you are installing this language package as a prerequisite for an Apertium translation pair, then do (typically as root / with sudo): |
| 31 |
|
| 32 |
```console |
| 33 |
# make install |
| 34 |
``` |
| 35 |
|
| 36 |
You can give a `--prefix` to `./autogen.sh` to install as a non-root user, but make sure to use the same prefix when installing the translation pair and any other language packages. |
| 37 |
|
| 38 |
If any of this doesn't make sense or doesn't work, see https://wiki.apertium.org/wiki/Install_language_data_by_compiling |
| 39 |
|
| 40 |
## Testing |
| 41 |
|
| 42 |
If you are in the source directory after running make, the following commands should work: |
| 43 |
|
| 44 |
``` |
| 45 |
$ echo "Voy a la playa" | apertium -d . spa-morph |
| 46 |
^Voy/ir<vblex><pri><p1><sg>$ ^a/a<pr>$ ^la/el<det><def><f><sg>/lo<prn><pro><p3><f><sg>$ |
| 47 |
^playa/playa<n><f><sg>$^./.<sent>$ |
| 48 |
|
| 49 |
``` |
| 50 |
|
| 51 |
``` |
| 52 |
$ echo "Voy a la playa" | apertium -d . spa-tagger |
| 53 |
^ir<vblex><pri><p1><sg>$ ^a<pr>$ ^el<det><def><f><sg>$ ^playa<n><f><sg>$^.<sent>$ |
| 54 |
``` |
| 55 |
|
| 56 |
## Tagger model training |
| 57 |
|
| 58 |
To train the tagger model, do one of the following: |
| 59 |
|
| 60 |
Supervised training: |
| 61 |
```console |
| 62 |
$ make -f tagger.supervised.make |
| 63 |
``` |
| 64 |
|
| 65 |
Unsupervised training |
| 66 |
```console |
| 67 |
$ make -f tagger.unsupervised.make |
| 68 |
``` |
| 69 |
|
| 70 |
For details on the corpora used in training, check the [corpora information](tagger-data/README.md). |
| 71 |
|
| 72 |
For more information, see https://wiki.apertium.org/wiki/Tagger_training |
| 73 |
|
| 74 |
## Files and data |
| 75 |
|
| 76 |
* [`apertium-spa.spa.metadix`](apertium-spa.spa.metadix) - Monolingual dictionary |
| 77 |
* [`spa.prob`](spa.prob) - Tagger model |
| 78 |
* [`apertium-spa.spa.rlx`](apertium-spa.spa.rlx) - Constraint Grammar disambiguation rules |
| 79 |
* [`apertium-spa.post-spa.dix`](apertium-spa.post-spa.dix) - Post-generator |
| 80 |
* [`modes.xml`](modes.xml) - Translation modes |
| 81 |
|
| 82 |
## For more information |
| 83 |
|
| 84 |
* https://wiki.apertium.org/wiki/Installation |
| 85 |
* https://wiki.apertium.org/wiki/apertium-spa |
| 86 |
* https://wiki.apertium.org/wiki/Using_an_lttoolbox_dictionary |
| 87 |
|
| 88 |
## Help and support |
| 89 |
|
| 90 |
If you need help using this language pair or data, you can contact: |
| 91 |
|
| 92 |
* Mailing list: [email protected] |
| 93 |
* IRC: `#apertium` on `irc.oftc.net` (irc://irc.oftc.net/#apertium) |
| 94 |
|
| 95 |
See also the file AUTHORS included in this distribution. |
| 96 |
|