commit
481653c382
1 changed files with 89 additions and 0 deletions
-
89README.md
@ -0,0 +1,89 @@ |
|||||
|
#Proyecto Api y Front para Eslema v2 |
||||
|
|
||||
|
#Sistema Base: |
||||
|
|
||||
|
Debian 11 |
||||
|
|
||||
|
##Instalacion Apertium |
||||
|
|
||||
|
###Instalamos los repositorios de apertium |
||||
|
```bash |
||||
|
curl -sS https://apertium.projectjj.com/apt/install-nightly.sh | sudo bash |
||||
|
``` |
||||
|
|
||||
|
###Instalamos apertium |
||||
|
|
||||
|
```bash |
||||
|
sudo apt-get -f install apertium-all-dev |
||||
|
``` |
||||
|
|
||||
|
###Instalamos los paquetes de idioma de Asturiano y Castellano |
||||
|
|
||||
|
```bash |
||||
|
sudo apt-get install apertium-ast |
||||
|
sudo apt-get install apertium-spa |
||||
|
sudo apt-get install apertium-spa-ast |
||||
|
``` |
||||
|
#Desarrollo del API |
||||
|
|
||||
|
##Diseño |
||||
|
|
||||
|
El api ira directo a Apertium a traves del controlador pasando la información como JSON. |
||||
|
|
||||
|
El apì tendra los siguientes endpoints: |
||||
|
|
||||
|
/listPairs -- Lista Pares |
||||
|
/list -- Lista el tipo de informacion |
||||
|
q: type of information to list |
||||
|
pairs (alias for /listPairs) |
||||
|
analyzers/analysers |
||||
|
generators |
||||
|
taggers/disambiguators |
||||
|
/translate -- Traduce el texto |
||||
|
langpair: language pair to use for translation |
||||
|
q: text to translate |
||||
|
markUnknown=no (optional): include this to remove "*" in front of unknown words |
||||
|
deformat: deformatter to be used: one of html (default), txt, rtf |
||||
|
reformat: deformatter to be used: one of html, html-noent (default), txt, rtf |
||||
|
format: if deformatter and reformatter are the same, they can be specified here |
||||
|
[ver formatoos reconocidos] |
||||
|
/translateDoc -- Traduce un archivo |
||||
|
langpair: language pair to use for translation |
||||
|
file: document to translate |
||||
|
markUnknown=no (optional): include this to remove "*" in front of unknown words |
||||
|
/analyze or /analyse -- Analiza el texto morfologicamente |
||||
|
lang: language to use for analysis |
||||
|
q: text to analyze |
||||
|
/generate -- genera formas de superficie??? de un texto |
||||
|
lang: language to use for generation |
||||
|
q: text to generate |
||||
|
/perWord -- Perform morphological tasks per word |
||||
|
lang: language to use for tasks |
||||
|
modes: morphological tasks to perform on text (15 combinations possible - delimit using '+') |
||||
|
tagger/disambig |
||||
|
biltrans |
||||
|
translate |
||||
|
morph |
||||
|
q: text to perform tasks on |
||||
|
/listLanguageNames -- Get localized language names |
||||
|
locale: language to get localized language names in |
||||
|
languages: list of '+' delimited language codes to retrieve localized names for (optional - if not specified, all available codes will be returned) |
||||
|
/calcCoverage -- Get coverage of a language on a text |
||||
|
lang: language to analyze with |
||||
|
q: text to analyze for coverage |
||||
|
|
||||
|
/identifyLang -- Return a list of languages with probabilities of the text being in that language. Uses CLD2 if that's installed, otherwise will try any analyser modes. |
||||
|
q: text which you would like to compute probabilities for |
||||
|
/stats -- Return some statistics about pair usage, uptime, portion of time spent actively translating |
||||
|
requests=N (optional): limit period-based stats to last N requests |
||||
|
|
||||
|
## Formatos reconocidos |
||||
|
plain text: -f txt (apertium-destxt) |
||||
|
HTML: -f html or -f html-noent (apertium-deshtml) |
||||
|
html prints non-ASCII chars using entities, html-noent keeps non-ASCII as-is; the difference is in the reformatter |
||||
|
RTF: -f rtf (apertium-desrtf) |
||||
|
OpenOffice.org Writer ODT: -f odt (apertium-desodt) |
||||
|
Microsoft Word DOCX, WXML: -f wxml (apertium-deswxml) |
||||
|
Microsoft Powerpoint PPTX: -f pptx (apertium-despptx) |
||||
|
Microsoft Excel XLSX: -f xlsx (apertium-desxlsx) |
||||
|
QuarkXPress XpressTag: -f xpresstag (apertium-desxpresstag) |
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue