Skip to content

Commit

Permalink
ICU-22373 Export segmentation dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
robertbastian authored and sffc committed May 2, 2023
1 parent 62f4938 commit 6c05042
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions .ci-builds/.azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ jobs:
./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata/uprops/fast --trie-type fast --all
mkdir -p icuexportdata/uprops/small
./bin/icuexportdata --mode uprops --index --copyright --verbose --destdir icuexportdata/uprops/small --trie-type small --all
displayName: 'Build property data export files'
displayName: 'Build property data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -682,7 +682,7 @@ jobs:
./bin/icuexportdata --mode norm --index --copyright --verbose --destdir icuexportdata/norm/fast --trie-type fast --all
mkdir -p icuexportdata/norm/small
./bin/icuexportdata --mode norm --index --copyright --verbose --destdir icuexportdata/norm/small --trie-type small --all
displayName: 'Build normalization data export files'
displayName: 'Build normalization data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -691,7 +691,7 @@ jobs:
./bin/icuexportdata --mode ucase --index --copyright --verbose --destdir icuexportdata/ucase/fast --trie-type fast --all
mkdir -p icuexportdata/ucase/small
./bin/icuexportdata --mode ucase --index --copyright --verbose --destdir icuexportdata/ucase/small --trie-type small --all
displayName: 'Build case data export files'
displayName: 'Build case data files'
env:
LD_LIBRARY_PATH: lib
- script: |
Expand All @@ -703,7 +703,19 @@ jobs:
mkdir -p icuexportdata/collation/implicithan
./bin/genrb -X -s data/coll/ --ucadata data/in/coll/ucadata-implicithan-icu4x.icu -d icuexportdata/collation/implicithan $FILES
rm icuexportdata/collation/implicithan/*.res
displayName: 'Build collation data export files'
displayName: 'Build collation data files'
env:
LD_LIBRARY_PATH: lib
- script: |
cd icu4c/source
mkdir -p icuexportdata/segmenter/dictionary
for FILE in `ls data/brkitr/dictionaries`
do
./bin/gendict --uchars data/brkitr/dictionaries/$FILE /dev/stdout | \
python3 -c 'import sys; data = sys.stdin.buffer.read(); print(f"trie_data = {[data[i + 1] << 8 | data[i] for i in range(64, len(data) - 1, 2)]}")' \
> icuexportdata/segmenter/dictionary/`basename $FILE .txt`.toml
done
displayName: 'Build segmenter dictionary files'
env:
LD_LIBRARY_PATH: lib
- task: ArchiveFiles@2
Expand Down

0 comments on commit 6c05042

Please sign in to comment.