Index: incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix
===================================================================
--- incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix (revision 70218)
+++ incubator/apertium-pol-rus/apertium-pol-rus.pol-rus.dix (revision 70219)
@@ -83,6 +83,7 @@
+
@@ -202,17 +203,6 @@
ktokolwiekвсякий
ktokolwiekкто-нибудь
wieleмного
- wieleмногий
- wieleмногие
- wieleмножество
- wielemnógo
- wieleмасса
- wieleмно́гие
- wieleмно́гий
- wieleмно́го
- wieleмногое
- wieleнема́ло
- wieleобилие
obaка́ждый
obaкаждый
obaо́ба
@@ -227,7 +217,6 @@
czyjчeй
czyjче́йный
naszнаш
- nasznaš
waszваш
waszтвой
jakiкакой
@@ -268,8 +257,8 @@
+ prpersя
prpersя
- prpersя
prpersмы
prpersты
prpersты
@@ -286,12 +275,11 @@
-
- toэто
-
+
+ toэто
coчто
- wszystkoвсё
- wszyscyвсе
+ wszystkoвесь
+ wszyscyвесь
mójмой
twójтвой
swójсвой
@@ -307,7 +295,28 @@
niczyjничей
żadenникакой
innyдругой
+ wieleмного
+ toэто
+ coчто
+ wszystkoвесь
+ wszyscyвесь
+ mójмой
+ twójтвой
+ swójсвой
+ jejеё
+ jegoего
+ ichих
+ tyleстолько
+ każdyкаждый
+ takiтакой
+ kilkaсколько
+ czyjчей
+ ileсколько
+ niczyjничей
+ żadenникакой
+ innyдругой
+
pierwszyпервый
drugiвторой
trzeciтретий
@@ -7640,6 +7649,8 @@
ksкн
płkполк
płkполк
+ godzч
+ złзл
npнапример
etcит.д.
tzwт.н.
@@ -7679,7 +7690,7 @@
IIII
IIIIII
IVIV
- VVmusic coding
+ VV
VIVI
VIIVII
VIIIVIII
@@ -7706,11 +7717,11 @@
- thethe
+
dede
vonvon
@@ -7730,6 +7741,7 @@
MołdawiaМолдавия
BułgariaБолгария
AustriaАвстрия
+ LibiaЛивия
RumuniaРумыния
HiszpaniaИспания
JaponiaЯпония
@@ -7794,7 +7806,10 @@
PawełПавел
PiotrПётр
+ WikipediaВикипедия
+ WikimediaВикимедия
+
JoseХосе
JoséХосе
JohnДжон
@@ -20068,36 +20083,14 @@
językговор
językдиалект
językжаргон
- stopień# Celsjuszaградус
- stopień# Celsjuszaстепень
- stopień# Celsjuszaступень
- stopień# Celsjuszaотметка
- stopień# Celsjuszaступенька
- stopień# Celsjuszaобъём
- stopień# Celsjuszaбалл
- stopień# Celsjuszaзаметка
- stopień# Celsjuszaзвание
- stopień# Celsjuszaлестница
- stopień# Celsjuszaмера
- stopień# Celsjuszaоценка
- stopień# Celsjuszaподножка
- stopień# Celsjuszaположение
- stopień# Celsjuszaпомета
- stopień# Celsjuszaпометка
- stopień# Celsjuszaпоступь
- stopień# Celsjuszaпоходка
- stopień# Celsjuszaразмер
- stopień# Celsjuszaранг
- stopień# Celsjuszaряд
- stopień# Celsjuszaстатья
- stopień# Celsjuszaуровень
- stopień# Celsjuszaуступ
- stopień# Celsjuszaход
- stopień# Celsjuszaчин
- stopień# Celsjuszaшаг
- stopień# Celsjuszaшеренга
- stopień# Celsjuszaэтаж
- stopień# Celsjuszaэшелон
+ stopieńградус
+ stopieńстепень
+ stopieńступень
+ stopieńотметка
+ stopieńзвание
+ stopieńранг
+ stopieńряд
+ stopieńчин
ilośćколичество
ilośćчисло
ilośćмасса
@@ -23109,7 +23102,7 @@
ruchтрафик
ruchшаг
miesiącмесяц
- tysiącтысяча
+ tysiącтысяча
zawodnikигрок
zawodnikгонщик
zawodnikкартежник
@@ -36152,6 +36145,7 @@
partykułaчастица
siłaсила
mogiłąмогила
+ euroевро
ludzieлюди
@@ -43816,6 +43810,13 @@
chciećхотеть
chodzićходить
pochodzićпроисходить
+ wchodzićвходить
+ wschodzićвсходить
+ dochodzićдоходить
+ przechodzićпроходить
+ uchodzićуходить
+ zachodzićиметьместо
+ zachodzićслучаться
chowaćпрятать
chowaćпрятать
chowaćрасти
@@ -44344,11 +44345,10 @@
widziećвидеть
wiedziećведать
wiedziećведать
- wiedziećзнать²
- wiedziećзнать²
+ wiedziećзнать
+ wiedziećзнать
wierzyćверить
- wieźćвезти¹
- wieźćвезти²
+ wieźćвезти
wisiećвисеть
włączaćвключать
włączaćвключать
@@ -44439,10 +44439,12 @@
wzbudzaćвозбуждать
wzbudzaćвозбуждать
wziąćвзять
+ odjąćотнять
+ objąćвключитьвсебя
+ objąćобнять
zabićубить
zabićубить
- zachorowaćзаболеть¹
- zachorowaćзаболеть²
+ zachorowaćзаболеть
zacząćначать
zająćзанять
podąćподать
@@ -44500,6 +44502,13 @@
wydaćиздать
wydaćвыдать
wydaćзатратить
+ powiedziećсказать
+ zginąćумереть
+ zginąćпропасть
+ zginąćпотеряться
+ ogłosićизвестить
+ ogłosićзаявить
+ ogłosićобъявить
Index: incubator/apertium-pol-rus/dev/from_morpheus.py
===================================================================
--- incubator/apertium-pol-rus/dev/from_morpheus.py (revision 70218)
+++ incubator/apertium-pol-rus/dev/from_morpheus.py (revision 70219)
@@ -106,7 +106,7 @@
# wordclass = sorted(inventories, key = len)[-1]
for inventory in inventories:
- if 'stać' in inventory:
+ if 'ogłosić' in inventory:
wordclass = inventory
print(wordclass)
Index: incubator/apertium-pol-rus/t/README.org
===================================================================
--- incubator/apertium-pol-rus/t/README.org (nonexistent)
+++ incubator/apertium-pol-rus/t/README.org (revision 70219)
@@ -0,0 +1,47 @@
+#+STARTUP: showall
+
+
+* Setting up tests for a new language pair
+To add these test scripts to your language pair, go into your language
+pair directory and do:
+
+#+BEGIN_SRC sh
+git clone https://github.com/unhammer/apertium-wiki-tests t
+# edit t/config.sh.in and save as t/config.sh
+svn add --depth=files t
+#+END_SRC
+
+You should have your tests in a page named after your language pair, e.g.
+http://wiki.apertium.org/wiki/apertium-sme-smj/Regression_tests
+and
+http://wiki.apertium.org/wiki/apertium-sme-smj/Pending_tests
+
+
+* Running the tests
+
+To run the tests from your language pair, assuming it's been set up as
+shown above, do
+
+#+BEGIN_SRC sh
+ t/update-latest
+#+END_SRC
+
+This will overwrite the files named t/latest-pending.results and
+t/latest-regression.results. You can view the differences with
+
+#+BEGIN_SRC sh
+ svn diff
+#+END_SRC
+
+Test results are kept in SVN since that means we don't have to keep
+moving things back and forth between "Pending" and "Regression" in the
+wiki whenever we pass a new test (or fail an old one), and we get a
+nice log of our progression.
+
+To run just regression or just pending tests, use t/pending-tests or
+t/regression-tests. Pass the -f argument to those scripts to only see
+failed regression tests or passed pending tests, e.g.
+
+#+BEGIN_SRC sh
+t/regression-tests -f
+#+END_SRC
Index: incubator/apertium-pol-rus/t/config.sh
===================================================================
--- incubator/apertium-pol-rus/t/config.sh (nonexistent)
+++ incubator/apertium-pol-rus/t/config.sh (revision 70219)
@@ -0,0 +1,2 @@
+# Example configuration, just list what pairs/directions you want to test:
+PAIRS=( pol-rus rus-pol )
Index: incubator/apertium-pol-rus/t/config.sh.in
===================================================================
--- incubator/apertium-pol-rus/t/config.sh.in (nonexistent)
+++ incubator/apertium-pol-rus/t/config.sh.in (revision 70219)
@@ -0,0 +1,2 @@
+# Example configuration, just list what pairs/directions you want to test:
+PAIRS=( sme-nob nob-sme )
Index: incubator/apertium-pol-rus/t/pending-tests
===================================================================
--- incubator/apertium-pol-rus/t/pending-tests (nonexistent)
+++ incubator/apertium-pol-rus/t/pending-tests (revision 70219)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Run with -p to show only passing tests
+
+set -e -u
+
+source "$(dirname $0)"/config.sh
+
+for pair in "${PAIRS[@]}"; do
+ bash "$(dirname $0)"/wiki-tests -u "$@" Pending "${pair}"
+done
Property changes on: incubator/apertium-pol-rus/t/pending-tests
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: incubator/apertium-pol-rus/t/regression-tests
===================================================================
--- incubator/apertium-pol-rus/t/regression-tests (nonexistent)
+++ incubator/apertium-pol-rus/t/regression-tests (revision 70219)
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+# Run with -f to show only failing tests
+
+set -e -u
+
+source "$(dirname $0)"/config.sh
+
+for pair in "${PAIRS[@]}"; do
+ bash "$(dirname $0)"/wiki-tests -u "$@" Regression "${pair}"
+done
Property changes on: incubator/apertium-pol-rus/t/regression-tests
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: incubator/apertium-pol-rus/t/update-latest
===================================================================
--- incubator/apertium-pol-rus/t/update-latest (nonexistent)
+++ incubator/apertium-pol-rus/t/update-latest (revision 70219)
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+cd "$(dirname $0)"/../
+t/regression-tests > t/latest-regression.results &
+t/pending-tests > t/latest-pending.results &
+wait
Property changes on: incubator/apertium-pol-rus/t/update-latest
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: incubator/apertium-pol-rus/t/wiki-tests
===================================================================
--- incubator/apertium-pol-rus/t/wiki-tests (nonexistent)
+++ incubator/apertium-pol-rus/t/wiki-tests (revision 70219)
@@ -0,0 +1,163 @@
+#!/bin/bash
+
+set -e -u
+
+######## Globals:
+
+# You shouldn't have to change this unless the wiki gets a new host:
+if [[ ! -f "$(dirname $0)/../config.log" ]]; then
+ echo "Can't find $(dirname $0)/../config.log, did you forget to run autogen.sh?" >&2
+ exit 1
+fi
+declare -r PACKAGE=$(grep ^PACKAGE= "$(dirname $0)/../config.log" |grep -o "apertium-[^']*") # e.g. apertium-sme-nob
+declare -r BASEURL="http://wiki.apertium.org/wiki/${PACKAGE}"
+
+# Workarounds for Mac's:
+SED=sed
+if [[ "$(uname -s)" = Darwin ]]; then
+ SED=gsed
+fi
+declare -r SED
+
+
+######## Functions:
+
+fetchtests () {
+ local -r update=$1
+ local -r testtype=$2
+ local -r html=$3
+
+ if ${update}; then
+ tmp=$(mktemp -t wiki-tests.html.XXXXXXXXXX)
+ if wget -O "${tmp}" -q "${BASEURL}/${testtype}" && [[ -s "${tmp}" ]]; then
+ mv "${tmp}" "${html}"
+ else
+ rm "${tmp}"
+ echo "Couldn't fetch ${BASEURL}/${testtype}" >&2
+ fi
+ fi
+
+ if [[ ! -s "${html}" ]]; then
+ echo "${html} does not exist or is empty (use '-u' option)" >&2
+ exit 1
+ fi
+}
+
+cleantst () {
+ # Would use these, but printf on Mac doesn't support unicode
+ # names, so the below sed's use *literal* byte-order-marks and
+ # zero-width-spaces:
+ local bom=$(env printf "\uFEFF")
+ local zws=$(env printf "\u200B")
+ $SED 's/^ *//; s/ *$//; s/\([^,.?!:;]\)$/\1./g; s/ */ /g' \
+ | $SED -e "s///g" \
+ | $SED -e "s///g"
+}
+cleansrc () {
+ local -r srclang=$1 trglang=$2
+ local -r tdir="\\((${srclang})\\|(${srclang}-${trglang})\\)"
+ grep -o "
${tdir}[^→]*" |$SED "s%*[^>]*>%%g; s% *${tdir} *%%" | cleantst
+}
+cleantrg () {
+ local -r srclang=$1 trglang=$2
+ local -r tdir="\\((${srclang})\\|(${srclang}-${trglang})\\)"
+ grep -o " ${tdir}.*" | $SED 's%[^→]*→ *%%; s%::.*%%' | cleantst
+}
+
+summary () {
+ local -r mode=$1 srclist=$2 trglist=$3 tstlist=$4 onlyfail=$5 onlypass=$6
+ # Output the MT vs ref translations:
+ local -i total=0
+ local -i correct=0
+ local -r sep=''
+ while IFS="${sep}" read -r src trg tst; do
+ if [[ "${trg}" = "${tst}" ]]; then
+ (( ++correct ))
+ $onlyfail || printf "%s\t %s\nWORKS\t %s\n\n\n" "${mode}" "${src}" "${tst}"
+ else
+ (( 1 ))
+ $onlypass || printf "%s\t %s\n\t- %s\n\t+ %s\n\n\n" "${mode}" "${src}" "${trg}" "${tst}"
+ fi
+ (( ++total ))
+ done < <(paste -d "${sep}" "${srclist}" "${trglist}" "${tstlist}")
+
+ # Output the sums:
+ pct=
+ if command -V calc &>/dev/null; then
+ pct=$(calc -p "round(${correct} / ${total}, 4) * 100")
+ pct=", ${pct}%"
+ fi
+ echo "${correct} / ${total}${pct}"
+}
+
+echo_revision () {
+ if rev=$(svn info 2>/dev/null); then
+ echo "${rev}" | grep -e ^Revisjon -e ^Revision
+ elif git config --get svn-remote.svn.fetch &>/dev/null; then
+ git svn info | grep -a -e ^Revisjon -e ^Revision
+ else
+ echo "(doesn't seem to be a repo)"
+ fi
+}
+showrevisions () {
+ echo_revision
+ grep ^AP_SRC "$(dirname $0)/../config.log" | while IFS='=' read -r var dir; do
+ printf "%s " "${var}"
+ ( cd "${dir//\'}"; echo_revision )
+ done
+}
+
+main () {
+ # Parse options:
+ update=false
+ onlypass=false
+ onlyfail=false
+ while getopts "upf" opt; do
+ case "$opt" in
+ u) update=true;;
+ f) onlyfail=true;;
+ p) onlypass=true;;
+ \?) echo "Invalid option" >&2; exit 2;;
+ :) echo "Option requires an argument." >&2; exit 2;;
+ esac
+ done
+ shift "$((OPTIND-1))"
+ if [[ $# -ne 2 ]] || ( ${onlypass} && ${onlyfail} ); then
+ echo "Usage: $0 [-u] [-p|-f] {Regression,Pending} srclang-trglang"
+ echo "-u Use updated tests"
+ echo "-p Show only passing tests"
+ echo "-f Show only failing tests"
+ exit 2
+ fi
+ declare -r testtype="$1_tests"
+ declare -r srclang="${2%%-*}"
+ declare -r trglang="${2##*-}"
+
+ # Derived options:
+ declare -r mode="${srclang}-${trglang}"
+ declare -r html="$(dirname $0)/${testtype}.html"
+
+ srclist=$(mktemp -t "${mode}-src.XXXXXXXXXX")
+ trglist=$(mktemp -t "${mode}-trg.XXXXXXXXXX")
+ tstlist=$(mktemp -t "${mode}-tst.XXXXXXXXXX")
+ rawlist=$(mktemp -t "${mode}-raw.XXXXXXXXXX")
+ trap "rm -f \"${srclist}\" \"${trglist}\" \"${tstlist}\" \"${rawlist}\"" EXIT
+
+ showrevisions
+ printf "Running $1-tests with mode \"${mode}\" "; ${update} && printf "with updated tests "; echo "..."
+ echo
+ fetchtests "${update}" "${testtype}" "${html}"
+ cleansrc "${srclang}" "${trglang}" < "${html}" > "${srclist}"
+ cleantrg "${srclang}" "${trglang}" < "${html}" > "${trglist}"
+ (
+ set -o pipefail
+ if ! apertium -d . "${mode}" < "${srclist}" > "${rawlist}"; then
+ cat "${rawlist}" >&2
+ return 1
+ fi
+ cleantst <"${rawlist}" > "${tstlist}"
+ )
+ summary "${mode}" "${srclist}" "${trglist}" "${tstlist}" "${onlyfail}" "${onlypass}"
+}
+
+main "$@"
Property changes on: incubator/apertium-pol-rus/t/wiki-tests
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property