Hello there!
I’m trying to run SRG for my research and I don’t know how to continue as I’ve stepped on an error.
Specs: l
OS: latest version of linux mint (Linux Mint 22.3 ‘Zena’ Cinnamon Edition)
Freeling: latest (I believe it is 4.2)
ACE: ace-0.9.34-x86-64
Here what I’ve done up to now:
#!/usr/bin/env bash
set -e
echo "=== Actualizando paquetes del sistema"
sudo apt-get update -y
sudo apt-get upgrade -y
echo "=== Instalando dependencias de compilación y herramientas básicas"
sudo apt-get install -y \
build-essential cmake git wget autoconf libtool pkg-config \
libboost-all-dev libicu-dev libxml2-dev libz-dev \
libncurses5-dev python3-dev python3-pip
echo "=== Descargando FreeLing"
git clone https://github.com/TALP-UPC/FreeLing.git
cd FreeLing
echo "=== Preparando compilación"
mkdir -p build && cd build
cmake .. \
-DPYTHON_BINDINGS=ON \
-DCMAKE_INSTALL_PREFIX=/usr/local
make -j$(nproc)
echo "=== Instalando FreeLing"
sudo make install
sudo ldconfig
# Volver al directorio original
cd ../
echo "=== Verificando FreeLing"
echo "Prueba FreeLing:"
analyze -f es.cfg <<< "El gato duerme."
echo "=== Instalando ACE parser"
wget https://sweaglesw.org/linguistics/ace/download/ace-0.9.34-x86-64.tar.gz
tar -xvzf ace-0.9.34-x86-64.tar.gz
echo "=== Clonando SRG"
git clone https://github.com/delph-in/srg.git
echo "=== Preparando SRG"
echo "=== Generando gramática con ACE"
cd ace-0.9.34
./ace -G grammar.dat -g ../srg/ace/config.tdl
echo "Prueba ACE con gramática"
./ace -g grammar.dat -Tq <<< "El perro ladra."
The problem arises right on the last line. When I call ‘ace’ with the example it throws this error:
NOTE: lexemes do not span position 2 `ladra'!
NOTE_ post reduction gap
SKIP: El perro ladra
NOTE: ignoring `El perro ladra'
It may seem that the lexeme ‘ladra’ is not valid somehow, however, I’ve tried with several examples to test this and the problem simply does not make sense to me. I’ve tried other verbs (eg: el perro muerde), other structures (eg: la tía de mi madre) and no punctuation (eg: el perro ladra) and every time it throws me the same error.
The first code chunk is because I am also trying to build a setup script for colleagues who would like to use SRG but don’t really have the patience or knowledge to go through all this (as far as I know, there is no such thing yet for SRG). Of course, I would like to publish it somewhere like here whenever it is ready and functional.
Thanks in advance!