-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #138 from tychy/find-word
add find function
- Loading branch information
Showing
5 changed files
with
82 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ testdata | |
testdata.zip | ||
.DS_Store | ||
|
||
coverage.out | ||
coverage.out | ||
out.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,13 @@ | ||
#!/bin/bash | ||
NUM_SAMPLE=1148 | ||
|
||
SKIP_SAMPLES=(0) | ||
|
||
# スクリプト全体でエラーが発生したら停止する | ||
set -e | ||
|
||
DATA_DIR=testdata | ||
|
||
for ((i = 1; i <= NUM_SAMPLE; i++)); do | ||
# サンプル番号がスキップリストに含まれていない場合に処理を実行 | ||
if ! [[ " ${SKIP_SAMPLES[*]} " =~ " $i " ]]; then | ||
echo "sample$i" | ||
mv $DATA_DIR/yaml/sample$i.yaml $DATA_DIR/yaml/bak_sample$i.yaml | ||
./bin/toukibo-parser -path="$DATA_DIR/pdf/sample$i.pdf" > $DATA_DIR/yaml/sample$i.yaml | ||
diff ./$DATA_DIR/yaml/bak_sample$i.yaml ./$DATA_DIR/yaml/sample$i.yaml || true | ||
rm $DATA_DIR/yaml/bak_sample$i.yaml | ||
fi | ||
echo "sample$i" | ||
mv $DATA_DIR/yaml/sample$i.yaml $DATA_DIR/yaml/bak_sample$i.yaml | ||
./bin/toukibo-parser -mode="run" -path="$DATA_DIR/pdf/sample$i.pdf" > $DATA_DIR/yaml/sample$i.yaml | ||
diff ./$DATA_DIR/yaml/bak_sample$i.yaml ./$DATA_DIR/yaml/sample$i.yaml || true | ||
rm $DATA_DIR/yaml/bak_sample$i.yaml | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/bash | ||
# スクリプト全体でエラーが発生したら停止する | ||
set -e | ||
|
||
DATA_DIR=testdata | ||
FIND=優先株式 | ||
|
||
for ((i = 1; i <= NUM_SAMPLE; i++)); do | ||
./bin/toukibo-parser -mode="find" -path="$DATA_DIR/pdf/sample$i.pdf" -target="$FIND" | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters