Commit 93393624 authored by Kartik Mistry's avatar Kartik Mistry 🇮🇳

Imported Upstream version 1.2.1

parents
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
(c) 2005, Universitat d'Alacant (Transducens group)
This diff is collapsed.
Sun Mar 1 20:31:52 GMT 2009
* Release 1.1.0
* Approximately 26,000 entries in the bilingual dictionary
Mon Oct 8 08:53:05 BST 2007
* Release 1.0.5
* Upgraded to unicode
* Approximately 13,000 entries in the bilingual dictionary
This diff is collapsed.
###############################################################################
## Makefile for Spanish--Catalan
###############################################################################
VERSION=1.2.1
LANG1=es
LANG2=ca
PREFIX1=$(LANG1)-$(LANG2)
PREFIX2=$(LANG2)-$(LANG1)
BASENAME=apertium-$(PREFIX1)
VAR1=std
VAR2=val-
PREFVAR1=#dejar en blanco
PREFVAR2=val-
TARGETS_COMMON = $(PREFIX1).automorf.bin $(PREFIX1).autobil.bin $(PREFIX1).autogen.bin \
$(PREFVAR1)$(PREFIX1).autopgen.bin \
$(PREFIX2).automorf.bin $(PREFIX2).autobil.bin \
$(PREFVAR1)$(PREFIX1).t1x.bin \
$(PREFVAR1)$(PREFIX2).t1x.bin \
$(PREFVAR1)$(PREFIX1).t1x \
$(PREFVAR1)$(PREFIX2).t1x \
$(PREFVAR2)$(PREFIX1).automorf.bin \
$(PREFVAR2)$(PREFIX1).autobil.bin \
$(PREFVAR2)$(PREFIX1).autogen.bin \
$(PREFVAR2)$(PREFIX1).autopgen.bin \
$(PREFVAR2)$(PREFIX1).t1x \
$(PREFVAR2)$(PREFIX2).t1x \
$(PREFVAR2)$(PREFIX1).t1x.bin \
$(PREFVAR2)$(PREFIX2).t1x.bin
# Use this goal for creating .deps, otherwise make -j2 will give problems:
.deps/.d:
if [ ! -d .deps ]; then mkdir .deps; fi
touch $@
# Prevent the .d file from being removed automatically:
.PRECIOUS: .deps/.d
###############################################################################
## Transducers, disambiguation rules, transfer
###############################################################################
.deps/commonbil.dix: $(BASENAME).$(PREFIX1).dix .deps/.d
xsltproc --stringparam lang cat --stringparam side right filter.xsl $< | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/pgen-ca.dix: $(BASENAME).post-ca.dix .deps/.d
xsltproc --stringparam alt cat alt.xsl $< >$@
.deps/pgen-ca_valencia.dix: $(BASENAME).post-ca.dix .deps/.d
xsltproc --stringparam alt val alt.xsl $< >$@
.deps/$(PREFVAR1)$(LANG1).dix: $(BASENAME).$(LANG1).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang cat --stringparam side left filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/$(PREFVAR2)$(LANG1).dix: $(BASENAME).$(LANG1).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang val --stringparam side left filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/$(PREFVAR1)$(LANG2).dix: $(BASENAME).$(LANG2).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang cat --stringparam side left filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/$(PREFVAR2)$(LANG2).dix: $(BASENAME).$(LANG2).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang val --stringparam side left filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/$(PREFVAR1)$(PREFIX1).dix: $(BASENAME).$(PREFIX1).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang cat --stringparam side right filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
.deps/$(PREFVAR2)$(PREFIX1).dix: $(BASENAME).$(PREFIX1).dix .deps/.d
xsltproc translate-to-default-equivalent.xsl $< | xsltproc --stringparam lang val --stringparam side right filter.xsl - | xsltproc --stringparam alt std alt.xsl - | gawk '{gsub("&","&amp;"); print;}' >$@
$(PREFVAR1)$(PREFIX1).automorf.bin: .deps/$(PREFVAR1)$(LANG1).dix $(BASENAME).$(LANG1).acx
apertium-validate-acx $(BASENAME).$(LANG1).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ $(BASENAME).$(LANG1).acx
$(PREFVAR1)$(PREFIX1).autobil.bin: .deps/$(PREFVAR1)$(PREFIX1).dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFVAR1)$(PREFIX1).autogen.bin: .deps/$(PREFVAR1)$(LANG2).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR1)$(PREFIX1).autopgen.bin: .deps/pgen-ca.dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFVAR2)$(PREFIX1).autopgen.bin: .deps/pgen-ca_valencia.dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFVAR1)$(PREFIX2).automorf.bin: .deps/$(PREFVAR1)$(LANG2).dix $(BASENAME).$(LANG2).acx
apertium-validate-acx $(BASENAME).$(LANG2).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ $(BASENAME).$(LANG2).acx
$(PREFVAR1)$(PREFIX2).autobil.bin: .deps/$(PREFVAR1)$(PREFIX1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR1)$(PREFIX2).autogen.bin: .deps/$(PREFVAR1)$(LANG1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR1)$(PREFIX2).autopgen.bin: $(BASENAME).post-$(LANG1).dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFVAR2)$(PREFIX1).automorf.bin: .deps/$(PREFVAR2)$(LANG1).dix $(BASENAME).$(LANG1).acx
apertium-validate-acx $(BASENAME).$(LANG1).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ $(BASENAME).$(LANG1).acx
$(PREFVAR2)$(PREFIX1).autobil.bin: .deps/$(PREFVAR2)$(PREFIX1).dix
apertium-validate-dictionary $<
lt-comp lr $< $@
$(PREFVAR2)$(PREFIX1).autogen.bin: .deps/$(PREFVAR2)$(LANG2).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR2)$(PREFIX2).automorf.bin: .deps/$(PREFVAR2)$(LANG2).dix $(BASENAME).$(LANG2).acx
apertium-validate-acx $(BASENAME).$(LANG2).acx
apertium-validate-dictionary $<
lt-comp lr $< $@ $(BASENAME).$(LANG2).acx
$(PREFVAR2)$(PREFIX2).autobil.bin: .deps/$(PREFVAR2)$(PREFIX1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR2)$(PREFIX2).autogen.bin: .deps/$(PREFVAR2)$(LANG1).dix
apertium-validate-dictionary $<
lt-comp rl $< $@
$(PREFVAR1)$(PREFIX1).t1x.bin: $(PREFVAR1)$(PREFIX1).t1x
apertium-validate-transfer $<
apertium-preprocess-transfer $< $@
$(PREFVAR1)$(PREFIX2).t1x.bin: $(PREFVAR1)$(PREFIX2).t1x
apertium-validate-transfer $<
apertium-preprocess-transfer $< $@
$(PREFVAR1)$(PREFIX1).t1x: $(BASENAME).$(PREFIX1).t1x
xsltproc --stringparam alt cat alt.xsl $< >$@
$(PREFVAR1)$(PREFIX2).t1x: $(BASENAME).$(PREFIX2).t1x
xsltproc --stringparam alt cat alt.xsl $< >$@
$(PREFVAR2)$(PREFIX1).t1x.bin: $(PREFVAR2)$(PREFIX1).t1x
apertium-validate-transfer $<
apertium-preprocess-transfer $< $@
$(PREFVAR2)$(PREFIX2).t1x.bin: $(PREFVAR2)$(PREFIX2).t1x
apertium-validate-transfer $<
apertium-preprocess-transfer $< $@
$(PREFVAR2)$(PREFIX1).t1x: $(BASENAME).$(PREFIX1).t1x
xsltproc --stringparam alt val alt.xsl $< >$@
$(PREFVAR2)$(PREFIX2).t1x: $(BASENAME).$(PREFIX2).t1x
xsltproc --stringparam alt val alt.xsl $< >$@
###############################################################################
## Distribution
###############################################################################
EXTRA_DIST=$(BASENAME).$(LANG1).dix $(BASENAME).$(PREFIX1).dix \
$(BASENAME).post-$(LANG1).dix $(BASENAME).post-$(LANG2).dix \
$(BASENAME).$(LANG2).dix $(BASENAME).$(LANG1).tsx \
$(BASENAME).$(LANG2).tsx $(BASENAME).$(PREFIX1).t1x \
$(BASENAME).$(PREFIX2).t1x $(PREFIX1).prob $(PREFIX2).prob \
modes.xml translate-to-default-equivalent.xsl alt.xsl \
$(PREFIX1)-latin1.prob $(PREFIX2)-latin1.prob \
$(BASENAME).$(LANG1).acx $(BASENAME).$(LANG2).acx \
filter.xsl filter.sh
###############################################################################
## Installation
###############################################################################
apertium_es_cadir=$(prefix)/share/apertium/$(BASENAME)/
# Files which should be installed to $(prefix)/share/apertium/$(BASENAME)/:
apertium_es_ca_DATA=$(TARGETS_COMMON) \
$(PREFIX1).prob $(PREFIX2).prob $(PREFIX1)-latin1.prob $(PREFIX2)-latin1.prob
apertium_modesdir=$(prefix)/share/apertium/modes/
modes/$(PREFIX1).mode: modes.xml
apertium-validate-modes modes.xml
apertium-gen-modes modes.xml
cp *.mode modes/
# All modes are created by the same goal, listing several will just give problems with make -j2
noinst_DATA=modes/$(PREFIX1).mode
install-data-local:
mv modes modes.bak
apertium-gen-modes modes.xml apertium-$(PREFIX1)
rm -rf modes
mv modes.bak modes
test -d $(DESTDIR)$(apertium_modesdir) || mkdir $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR1)$(PREFIX1).mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR1)$(PREFIX2).mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR2)$(PREFIX1).mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR2)$(PREFIX2).mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) es-ca_valencia.mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR1)$(PREFIX1)-multi.mode $(DESTDIR)$(apertium_modesdir)
$(INSTALL_DATA) $(PREFVAR1)$(PREFIX2)-multi.mode $(DESTDIR)$(apertium_modesdir)
###############################################################################
## Cleanup
###############################################################################
CLEANFILES = $(TARGETS_COMMON)
clean-local:
-rm -rf .deps modes
This diff is collapsed.
**************Spanish--Catalan******************
You need apertium-3.0 and lttoolbox-3.0 to use this translator. To compile
the linguistic data simply do:
./configure
make
make install
inside of this directory.
To use the translator, use the commands:
apertium es-ca (to translate from Spanish to Catalan)
apertium ca-es (to translate from Catalan to Spanish)
Type the suitable command in the terminal, press Enter, type the text and press Ctrl+D to get the translation.
**************Spanish--Catalan with economy vocabulary**********************
To compile using the economy vocabulary (entries with "eco" tag in the dictionaries), type:
cp Makefile.am.eco Makefile.am
./autogen.sh
make
sudo make install
If you had the standard linguistic data already installed, or if some error occurs in compilation, you should type:
cp Makefile.am.eco Makefile.am
sudo make distclean
./autogen.sh
make
sudo make install
After compiling, to use Apertium with the economy vocabulary, use the same commands presented above (apertium es-ca ; apertium ca-es)
**************TAGGER *****************************
To use this language-pair package with apertium YOU DO NOT NEED TO
RETRAIN THE TAGGER. Probabilities and auxiliary data are provided for
both the ca-es and the es-ca translation directions which should be
acceptable for most applications, and should work even if you change
the dictionaries in a reasonably way.
If for some reason you need to retrain the tagger (for example, you
have made really extensive changes to the dictionaries such as
creating new lexical categories), please see the documentation
on our Wiki:
http://wiki.apertium.org/wiki/Tagger_training
===================================================================
More information about this module, and others can be found on
the Apertium: Wiki, http://wiki.apertium.org
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- nxml -*- -->
<!--
Copyright (C) 2005 Universitat d'Alacant / Universidad de Alicante
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA.
-->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" encoding="UTF-8"/>
<xsl:param name="alt"/>
<xsl:template match="/">
<xsl:value-of select="string('&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#xA;')"/>
<xsl:apply-templates select="*|text()"/>
</xsl:template>
<xsl:template match="*">
<xsl:if test="not(count(./@alt)=1) or ./@alt=$alt">
<xsl:if test="not(local-name(.)=string('group'))">
<xsl:value-of select="string('&lt;')"/>
<xsl:value-of select="local-name(.)"/>
<xsl:for-each select="./@*">
<xsl:if test="not(local-name(.)=string('alt'))">
<xsl:value-of select="string(' ')"/>
<xsl:value-of select="local-name(.)"/>
<xsl:value-of select="string('=&quot;')"/>
<xsl:value-of select="string(.)"/>
<xsl:value-of select="string('&quot;')"/>
</xsl:if>
</xsl:for-each>
</xsl:if>
<xsl:choose>
<xsl:when test="count(text()[normalize-space(.)] | *)=0">
<xsl:if test="not(local-name(.)=string('group'))">
<xsl:value-of select="string('/&gt;')"/>
</xsl:if>
</xsl:when>
<xsl:otherwise>
<xsl:if test="not(local-name(.)=string('group'))">
<xsl:value-of select="string('&gt;')"/>
</xsl:if>
<xsl:apply-templates/>
<xsl:if test="not(local-name(.)=string('group'))">
<xsl:value-of select="string('&lt;/')"/>
<xsl:value-of select="local-name(.)"/>
<xsl:value-of select="string('&gt;')"/>
</xsl:if>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
This diff is collapsed.
<?xml version="1.0"?>
<analysis-chars>
<!-- Make apostrophe variants equal ' -->
<char value="'">
<equiv-char value="&#x2019;"/>
<equiv-char value="&#x2BC;"/>
<equiv-char value="&#8217;"/>
</char>
<char value="&#183;">
<equiv-char value="."/>
</char>
</analysis-chars>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0"?>
<analysis-chars>
<!-- Make apostrophe variants equal ' -->
<char value="'">
<equiv-char value="&#x2019;"/>
<equiv-char value="&#x2BC;"/>
<equiv-char value="&#8217;"/>
</char>
<char value="&#183;">
<equiv-char value="."/>
</char>
</analysis-chars>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
File added
/* config.in. Generated from configure.ac by autoheader. */
/* Define to the address where bug reports for this package should be sent. */
#undef PACKAGE_BUGREPORT
/* Define to the full name of this package. */
#undef PACKAGE_NAME
/* Define to the full name and version of this package. */
#undef PACKAGE_STRING
/* Define to the one symbol short name of this package. */
#undef PACKAGE_TARNAME
/* Define to the home page for this package. */
#undef PACKAGE_URL
/* Define to the version of this package. */
#undef PACKAGE_VERSION
This diff is collapsed.
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
AC_INIT([apertium-es-ca], [1.2.1], [sortiz@users.sourceforge.net])
AM_INIT_AUTOMAKE([apertium-es-ca], [1.2.1], no-define)
AC_PROG_LN_S
AC_PROG_AWK
AC_CONFIG_HEADER([config])
m4_define([required_apertium_version], [3.2.0])
PKG_CHECK_MODULES(APERTIUM, apertium >= required_apertium_version, [], [PKG_CHECK_MODULES(APERTIUM, apertium-3.2 >= required_apertium_version)])
AC_SUBST(MODES)
AC_OUTPUT([Makefile])
File added
case $# in
3)
LANG=$1
SIDE=$2
;;
*)
echo "USAGE: fixvariants.sh LANG SIDE FILE";
echo "With SIDE one of 'left' or 'right'";
exit 1;
esac
xsltproc --stringparam lang $LANG --stringparam side $SIDE filter.xsl $3
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment