Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
Sciencebeam Trainer Grobid
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sciencebeam
Sciencebeam Trainer Grobid
Commits
98256f2c
Unverified
Commit
98256f2c
authored
5 years ago
by
Daniel Ecer
Committed by
GitHub
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
copy and upload segmentation training data (#8)
parent
01d5bae8
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/copy-raw-training-data-to-file-structure.sh
+36
-13
36 additions, 13 deletions
scripts/copy-raw-training-data-to-file-structure.sh
scripts/upload-dataset.sh
+4
-0
4 additions, 0 deletions
scripts/upload-dataset.sh
with
40 additions
and
13 deletions
scripts/copy-raw-training-data-to-file-structure.sh
+
36
−
13
View file @
98256f2c
...
...
@@ -20,22 +20,45 @@ fi
echo
"RAW_TRAINING_DATA_DIR=
${
RAW_TRAINING_DATA_DIR
}
"
echo
"DATASET_DIR=
${
DATASET_DIR
}
"
header_headers_dir
=
"
$DATASET_DIR
/header/corpus/headers"
header_tei_dir
=
"
$DATASET_DIR
/header/corpus/tei-raw"
mkdir_clean
()
{
for
dir
in
"
$@
"
;
do
echo
"creating or cleaning directory:
${
dir
}
"
mkdir
-p
"
${
dir
}
"
rm
"
${
dir
}
"
/
*
||
true
done
}
mkdir
-p
"
$header_headers_dir
"
mkdir
-p
"
$header_tei_dir
"
copy_segmentation_files
()
{
segmentation_raw_dir
=
"
$DATASET_DIR
/segmentation/corpus/raw"
segmentation_tei_dir
=
"
$DATASET_DIR
/segmentation/corpus/tei-raw"
mkdir_clean
"
$segmentation_raw_dir
"
"
${
segmentation_tei_dir
}
"
rm
"
${
header_headers_dir
}
"
/
*
||
true
rm
"
${
header_tei_dir
}
"
/
*
||
true
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$segmentation_raw_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.segmentation
"
$segmentation_raw_dir
"
echo
"renaming files
$segmentation_raw_dir
"
rename
's#\.training\.#\.#'
"
$segmentation_raw_dir
"
/
*
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$
header_headers
_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.
header
"
$header_headers
_dir
"
echo
"renaming files
$header_headers
_dir
"
rename
's#\.training\.#\.#'
"
$header_headers_dir
"
/
*
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$
segmentation_tei
_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.
segmentation.tei.xml
"
$segmentation_tei
_dir
"
rename
's#\.training\.#\.#'
"
$segmentation_tei
_dir
"
/
*
}
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$header_tei_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.header.tei.xml
"
$header_tei_dir
"
rename
's#\.training\.#\.#'
"
$header_tei_dir
"
/
*
copy_header_files
()
{
header_headers_dir
=
"
$DATASET_DIR
/header/corpus/headers"
header_tei_dir
=
"
$DATASET_DIR
/header/corpus/tei-raw"
mkdir_clean
"
$header_headers_dir
"
"
${
header_tei_dir
}
"
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$header_headers_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.header
"
$header_headers_dir
"
echo
"renaming files
$header_headers_dir
"
rename
's#\.training\.#\.#'
"
$header_headers_dir
"
/
*
echo
"copying files from
$RAW_TRAINING_DATA_DIR
to
$header_tei_dir
"
cp
-a
"
$RAW_TRAINING_DATA_DIR
/"
*
.header.tei.xml
"
$header_tei_dir
"
rename
's#\.training\.#\.#'
"
$header_tei_dir
"
/
*
}
copy_segmentation_files
copy_header_files
ls
-l
--recursive
"
${
DATASET_DIR
}
"
This diff is collapsed.
Click to expand it.
scripts/upload-dataset.sh
+
4
−
0
View file @
98256f2c
...
...
@@ -37,6 +37,10 @@ echo "CLOUD_DATATSET_PATH=${CLOUD_DATATSET_PATH}"
sub_dirs
=(
"segmentation/corpus/raw"
"segmentation/corpus/tei"
"segmentation/corpus/tei-raw"
"segmentation/corpus/tei-auto"
"header/corpus/headers"
"header/corpus/tei"
"header/corpus/tei-raw"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment