order in scripts

Former-commit-id: 945423dec6f4007f780b27fd590fb09578117b54
This commit is contained in:
rjawor 2015-04-24 11:10:17 +02:00
parent 04df67c6f0
commit 23aa113747
26 changed files with 121 additions and 143 deletions

View File

@ -1,25 +0,0 @@
S = set of concordia results
maxCoverage = empty // max coverage
/*
getPossibleCoverages
param A - set of concordia results, current coverage
return isTerminal - returns true if nothing from S can be added to A
*/
void getPossibleCoverages(A) {
allTerminal = true
for s in S: // to consider - sort intervals in S and always search from the last interval in A
// however - how to sort the intervals? maybe by their ends?
if not A intersects {s} // given the above, this check would only require to check if s overlaps with the last interval in A
getPossibleCoverages(A+{s})
allTerminal = false
if allTerminal then
score = scoreCoverage(A)
if score > scoreCoverage(maxCoverage)
maxCoverage = A
}

View File

@ -1,3 +1,6 @@
---------------------------- Developer's private notes -----------------------------
IN PROGRESS - concordia search zwraca pozycje tokenów z hash'a. Jak to odnieść do examples w korpusie?
- testy zużycia pamięci
- Prawdopodobnie długość example w markers będzie potrzebna tylko anubisowi (który, jak się okazuje, jest wolny). Pomyśleć, do czego można wykorzystać markery, bo ich idea wydaje się niezła.

View File

@ -1,5 +0,0 @@
#!/bin/sh
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -a "$1"

View File

@ -1,4 +0,0 @@
#!/bin/sh
rm prod/resources/temp/*
rm prod/resources/text-files/jrc_smaller.txt

View File

@ -1,5 +0,0 @@
#!/bin/sh
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -x "$1"

View File

@ -1,14 +0,0 @@
#!/bin/sh
echo "CONCORDIA INDEXER: Decompressing test file"
xz -dk prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA INDEXER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA INDEXER: reading from file"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -r prod/resources/text-files/jrc_smaller.txt

View File

@ -1,30 +0,0 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
xz -dk prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA RUNNER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -r prod/resources/text-files/jrc_smaller.txt
echo "CONCORDIA RUNNER: concordia searching for pattern: \"Współpraca Państw Członkowskich i Komisji Europejskiej\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -x "Współpraca Państw Członkowskich i Komisji Europejskiej"
echo "CONCORDIA RUNNER: concordia searching for pattern: \"8. W odniesieniu do artykułu 45 ustęp 12\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -x "8. W odniesieniu do artykułu 45 ustęp 12"
echo "CONCORDIA RUNNER: concordia searching for pattern: \"Prawo europejskie umożliwia handel zagraniczny\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -x "Prawo europejskie umożliwia handel zagraniczny"
echo "CONCORDIA RUNNER: searching for pattern: \"Parlamentu Europejskiego\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "Parlamentu Europejskiego" -n
echo "CONCORDIA RUNNER: searching for pattern: \"Dostęp do zatrudnienia\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "Dostęp do zatrudnienia" -n
echo "CONCORDIA RUNNER: searching for pattern: \"Ma on w szczególności prawo do podjęcia zatrudnienia dostępnego na terytorium innego Państwa Członkowskiego z takim samym pierwszeństwem\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "Ma on w szczególności prawo do podjęcia zatrudnienia dostępnego na terytorium innego Państwa Członkowskiego z takim samym pierwszeństwem" -n
#rm prod/resources/text-files/jrc_smaller.txt

View File

@ -1,18 +0,0 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
bunzip2 --keep prod/resources/text-files/large.txt.bz2
echo "CONCORDIA RUNNER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -r prod/resources/text-files/large.txt
echo "CONCORDIA RUNNER: searching for pattern: \"drawn from his own\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "drawn from his own" -n
echo "CONCORDIA RUNNER: searching for pattern: \"it is\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "it is" -n
rm prod/resources/text-files/large.txt

View File

@ -1,11 +0,0 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -r prod/resources/text-files/medium.txt
echo "CONCORDIA RUNNER: searching for pattern: \"drawn from his own\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "drawn from his own"
echo "CONCORDIA RUNNER: searching for pattern: \"it is\""
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "it is" -n

View File

@ -1,5 +0,0 @@
#!/bin/sh
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -s "$1" -n

View File

@ -1,14 +0,0 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
xz -dk prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA RUNNER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA RUNNER: testing"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -t prod/resources/text-files/jrc_smaller.txt
#rm prod/resources/text-files/jrc_smaller.txt

View File

@ -1,9 +0,0 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Running Concordia"
rm prod/resources/temp/*
echo "CONCORDIA RUNNER: testing"
./build/concordia-console/concordia-console -c prod/resources/concordia-config/concordia.cfg -t prod/resources/text-files/medium.txt

View File

@ -1,3 +0,0 @@
#!/bin/sh
head -$1 prod/resources/text-files/jrc_smaller.txt | tail -1

View File

@ -0,0 +1,5 @@
#!/bin/sh
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -a "$1"

4
scripts/concordia-clear-jrc.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
rm ../prod/resources/temp/*
rm ../prod/resources/text-files/jrc_smaller.txt

View File

@ -0,0 +1,5 @@
#!/bin/sh
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -x "$1"

14
scripts/concordia-index-jrc.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
echo "CONCORDIA INDEXER: Decompressing test file"
xz -dk ../prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA INDEXER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA INDEXER: reading from file"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -r ../prod/resources/text-files/jrc_smaller.txt

30
scripts/concordia-runner-jrc.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
xz -dk ../prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA RUNNER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -r ../prod/resources/text-files/jrc_smaller.txt
echo "CONCORDIA RUNNER: concordia searching for pattern: \"Współpraca Państw Członkowskich i Komisji Europejskiej\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -x "Współpraca Państw Członkowskich i Komisji Europejskiej"
echo "CONCORDIA RUNNER: concordia searching for pattern: \"8. W odniesieniu do artykułu 45 ustęp 12\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -x "8. W odniesieniu do artykułu 45 ustęp 12"
echo "CONCORDIA RUNNER: concordia searching for pattern: \"Prawo europejskie umożliwia handel zagraniczny\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -x "Prawo europejskie umożliwia handel zagraniczny"
echo "CONCORDIA RUNNER: searching for pattern: \"Parlamentu Europejskiego\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "Parlamentu Europejskiego" -n
echo "CONCORDIA RUNNER: searching for pattern: \"Dostęp do zatrudnienia\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "Dostęp do zatrudnienia" -n
echo "CONCORDIA RUNNER: searching for pattern: \"Ma on w szczególności prawo do podjęcia zatrudnienia dostępnego na terytorium innego Państwa Członkowskiego z takim samym pierwszeństwem\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "Ma on w szczególności prawo do podjęcia zatrudnienia dostępnego na terytorium innego Państwa Członkowskiego z takim samym pierwszeństwem" -n
rm ../prod/resources/text-files/jrc_smaller.txt

View File

@ -0,0 +1,18 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
bunzip2 --keep ../prod/resources/text-files/large.txt.bz2
echo "CONCORDIA RUNNER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -r ../prod/resources/text-files/large.txt
echo "CONCORDIA RUNNER: searching for pattern: \"drawn from his own\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "drawn from his own" -n
echo "CONCORDIA RUNNER: searching for pattern: \"it is\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "it is" -n
rm ../prod/resources/text-files/large.txt

11
scripts/concordia-runner.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA RUNNER: reading from file"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -r ../prod/resources/text-files/medium.txt
echo "CONCORDIA RUNNER: searching for pattern: \"drawn from his own\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "drawn from his own"
echo "CONCORDIA RUNNER: searching for pattern: \"it is\""
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "it is" -n

View File

@ -0,0 +1,5 @@
#!/bin/sh
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -s "$1" -n

14
scripts/concordia-test-jrc.sh Executable file
View File

@ -0,0 +1,14 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Decompressing test file"
xz -dk ../prod/resources/text-files/jrc_smaller.txt.xz
echo "CONCORDIA RUNNER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA RUNNER: testing"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -t ../prod/resources/text-files/jrc_smaller.txt
rm ../prod/resources/text-files/jrc_smaller.txt

View File

@ -0,0 +1,9 @@
#!/bin/sh
echo "CONCORDIA RUNNER: Running Concordia"
rm ../prod/resources/temp/*
echo "CONCORDIA RUNNER: testing"
../build/concordia-console/concordia-console -c ../prod/resources/concordia-config/concordia.cfg -t ../prod/resources/text-files/medium.txt

3
scripts/getSentenceFromJRC.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/sh
head -$1 ../prod/resources/text-files/jrc_smaller.txt | tail -1